Skip to content

Commit

Permalink
fixup! fundchannel: update to work with dual funding
Browse files Browse the repository at this point in the history
  • Loading branch information
niftynei committed Oct 10, 2019
1 parent 5d72838 commit 0e88f38
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions plugins/fundchannel.c
Expand Up @@ -150,9 +150,12 @@ static struct command_result *send_tx(struct command *cmd,

/* The txid might be updated, since the peer might have added
* inputs, also */
txid = json_strdup(cmd, buf, json_get_member(buf, result, "txid"));
if (!bitcoin_txid_from_hex(txid, strlen(txid), &fr->tx_id))
plugin_err("Unable to parse reserved txid %s", txid);
tok = json_get_member(buf, result, "txid");
if (tok) {
txid = json_strdup(cmd, buf, tok);
if (!bitcoin_txid_from_hex(txid, strlen(txid), &fr->tx_id))
plugin_err("Unable to parse reserved txid %s", txid);
}

/* Stash the channel_id so we can return it when finalized */
fr->chanstr = json_strdup(fr, buf, json_get_member(buf, result, "channel_id"));
Expand Down

0 comments on commit 0e88f38

Please sign in to comment.