mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 01:43:36 +01:00
Add the missing space between "if" and "("
Changelog-None
This commit is contained in:
parent
0ac91b4f99
commit
2ea91f834c
@ -3036,7 +3036,7 @@ static void init_channel(struct peer *peer)
|
||||
|
||||
status_debug("option_static_remotekey = %u", option_static_remotekey);
|
||||
|
||||
if(remote_ann_node_sig && remote_ann_bitcoin_sig) {
|
||||
if (remote_ann_node_sig && remote_ann_bitcoin_sig) {
|
||||
peer->announcement_node_sigs[REMOTE] = *remote_ann_node_sig;
|
||||
peer->announcement_bitcoin_sigs[REMOTE] = *remote_ann_bitcoin_sig;
|
||||
peer->have_sigs[REMOTE] = true;
|
||||
|
@ -554,7 +554,7 @@ static void test_invoice(struct command *cmd,
|
||||
const jsmntok_t *preimagetok;
|
||||
|
||||
assert(cmd->mode == CMD_USAGE);
|
||||
if(!param(cmd, buffer, params,
|
||||
if (!param(cmd, buffer, params,
|
||||
p_req("msatoshi", param_u64, &msatoshi_val),
|
||||
p_req("label", param_label, &label_val),
|
||||
p_req("description", param_escaped_string, &desc_val),
|
||||
|
@ -71,7 +71,7 @@ struct command_result *param_utxos(struct command *cmd,
|
||||
"Could not get a txid out of \"%s\"",
|
||||
json_strdup(tmpctx, buffer, &txid_tok));
|
||||
}
|
||||
if(!json_to_number(buffer, (const jsmntok_t*)&outnum_tok, outnum))
|
||||
if (!json_to_number(buffer, (const jsmntok_t*)&outnum_tok, outnum))
|
||||
return command_fail(cmd, JSONRPC2_INVALID_PARAMS,
|
||||
"Could not get a vout out of \"%s\"",
|
||||
json_strdup(tmpctx, buffer, &outnum_tok));
|
||||
|
@ -111,7 +111,7 @@ static struct wireaddr *make_onion(const tal_t *ctx,
|
||||
continue;
|
||||
|
||||
if (use_v3_autotor)
|
||||
if(strstr(line, "\"0.0") ||
|
||||
if (strstr(line, "\"0.0") ||
|
||||
strstr(line, "\"0.1") ||
|
||||
strstr(line, "\"0.2") ||
|
||||
strstr(line, "\"0.3")) {
|
||||
|
@ -1051,7 +1051,7 @@ static char* check_blockchain_from_bitcoincli(const tal_t *ctx,
|
||||
args_string(tmpctx, cmd),
|
||||
(int)output_bytes, output);
|
||||
|
||||
if(!json_tok_streq(output, valuetok,
|
||||
if (!json_tok_streq(output, valuetok,
|
||||
chainparams->bip70_name))
|
||||
return tal_fmt(ctx, "Error blockchain for bitcoin-cli?"
|
||||
" Should be: %s",
|
||||
|
@ -414,7 +414,7 @@ void peer_start_channeld(struct channel *channel,
|
||||
if (ld->config.ignore_fee_limits)
|
||||
log_debug(channel->log, "Ignoring fee limits!");
|
||||
|
||||
if(!wallet_remote_ann_sigs_load(tmpctx, channel->peer->ld->wallet, channel->dbid,
|
||||
if (!wallet_remote_ann_sigs_load(tmpctx, channel->peer->ld->wallet, channel->dbid,
|
||||
&remote_ann_node_sig, &remote_ann_bitcoin_sig)) {
|
||||
channel_internal_error(channel,
|
||||
"Could not load remote announcement signatures");
|
||||
@ -714,7 +714,7 @@ struct command_result *cancel_channel_before_broadcast(struct command *cmd,
|
||||
/* Check if we broadcast the transaction. (We store the transaction type into DB
|
||||
* before broadcast). */
|
||||
enum wallet_tx_type type;
|
||||
if(wallet_transaction_type(cmd->ld->wallet,
|
||||
if (wallet_transaction_type(cmd->ld->wallet,
|
||||
&cancel_channel->funding_txid,
|
||||
&type))
|
||||
return command_fail(cmd, LIGHTNINGD,
|
||||
|
@ -1075,7 +1075,7 @@ static struct command_result *json_fund_channel_cancel(struct command *cmd,
|
||||
}
|
||||
|
||||
if (peer->uncommitted_channel) {
|
||||
if(!peer->uncommitted_channel->fc || !peer->uncommitted_channel->fc->inflight)
|
||||
if (!peer->uncommitted_channel->fc || !peer->uncommitted_channel->fc->inflight)
|
||||
return command_fail(cmd, LIGHTNINGD, "No channel funding in progress.");
|
||||
|
||||
/* Make sure this gets notified if we succeed or cancel */
|
||||
|
@ -344,7 +344,7 @@ static char *opt_set_hsm_password(struct lightningd *ld)
|
||||
fflush(stdout);
|
||||
if (getline(&passwd, &passwd_size, stdin) < 0)
|
||||
return "Could not read password from stdin.";
|
||||
if(passwd[strlen(passwd) - 1] == '\n')
|
||||
if (passwd[strlen(passwd) - 1] == '\n')
|
||||
passwd[strlen(passwd) - 1] = '\0';
|
||||
if (tcsetattr(fileno(stdin), TCSAFLUSH, ¤t_term) != 0)
|
||||
return "Could not restore terminal options.";
|
||||
|
@ -2197,7 +2197,7 @@ void json_format_forwarding_object(struct json_stream *response,
|
||||
}
|
||||
json_add_string(response, "status", forward_status_name(cur->status));
|
||||
|
||||
if(cur->failcode != 0) {
|
||||
if (cur->failcode != 0) {
|
||||
json_add_num(response, "failcode", cur->failcode);
|
||||
json_add_string(response, "failreason",
|
||||
onion_type_name(cur->failcode));
|
||||
|
@ -162,7 +162,7 @@ static struct command *read_json_request(const tal_t *ctx,
|
||||
id = json_get_member(membuf_elems(&conn->mb), toks, "id");
|
||||
if (id) {
|
||||
cmd->id = tal(cmd, u64);
|
||||
if(!json_to_u64(membuf_elems(&conn->mb), id, cmd->id))
|
||||
if (!json_to_u64(membuf_elems(&conn->mb), id, cmd->id))
|
||||
plugin_err("JSON id '%*.s' is not a number",
|
||||
id->end - id->start,
|
||||
membuf_elems(&conn->mb) + id->start);
|
||||
|
@ -957,7 +957,7 @@ static bool channelseq(struct channel *c1, struct channel *c2)
|
||||
}
|
||||
|
||||
CHECK((c1->last_tx != NULL) == (c2->last_tx != NULL));
|
||||
if(c1->last_tx) {
|
||||
if (c1->last_tx) {
|
||||
CHECK(bitcoin_tx_eq(c1->last_tx, c2->last_tx));
|
||||
}
|
||||
CHECK(memeq(&c1->last_sig, sizeof(c1->last_sig),
|
||||
|
@ -3338,7 +3338,7 @@ static bool wallet_forwarded_payment_update(struct wallet *w,
|
||||
db_bind_null(stmt, 3);
|
||||
}
|
||||
|
||||
if(failcode != 0) {
|
||||
if (failcode != 0) {
|
||||
assert(state == FORWARD_FAILED || state == FORWARD_LOCAL_FAILED);
|
||||
db_bind_int(stmt, 4, (int)failcode);
|
||||
} else {
|
||||
@ -3386,7 +3386,7 @@ void wallet_forwarded_payment_add(struct wallet *w, const struct htlc_in *in,
|
||||
") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?);"));
|
||||
db_bind_u64(stmt, 0, in->dbid);
|
||||
|
||||
if(out) {
|
||||
if (out) {
|
||||
db_bind_u64(stmt, 1, out->dbid);
|
||||
db_bind_u64(stmt, 3, out->key.channel->scid->u64);
|
||||
db_bind_amount_msat(stmt, 5, &out->msat);
|
||||
@ -3411,7 +3411,7 @@ void wallet_forwarded_payment_add(struct wallet *w, const struct htlc_in *in,
|
||||
else
|
||||
db_bind_null(stmt, 8);
|
||||
|
||||
if(failcode != 0) {
|
||||
if (failcode != 0) {
|
||||
assert(state == FORWARD_FAILED || state == FORWARD_LOCAL_FAILED);
|
||||
db_bind_int(stmt, 9, (int)failcode);
|
||||
} else {
|
||||
|
@ -726,7 +726,7 @@ static struct command_result *json_listaddrs(struct command *cmd,
|
||||
|
||||
for (s64 keyidx = 0; keyidx <= *bip32_max_index; keyidx++) {
|
||||
|
||||
if(keyidx == BIP32_INITIAL_HARDENED_CHILD){
|
||||
if (keyidx == BIP32_INITIAL_HARDENED_CHILD){
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user