Browse Source

Closed: Cleanup for `wire_closing_init`

`final_scriptpubkey` is repeated with `funding_pubkey[LOCAL]`.
travis-debug
trueptolemy 5 years ago
committed by neil saitug
parent
commit
a1204a0b94
  1. 2
      closingd/closing_wire.csv
  2. 8
      closingd/closingd.c
  3. 2
      lightningd/closing_control.c

2
closingd/closing_wire.csv

@ -27,8 +27,6 @@ msgdata,closing_init,next_index_remote,u64,
msgdata,closing_init,revocations_received,u64,
msgdata,closing_init,channel_reestablish_len,u16,
msgdata,closing_init,channel_reestablish,u8,channel_reestablish_len
msgdata,closing_init,final_scriptpubkey_len,u16,
msgdata,closing_init,final_scriptpubkey,u8,final_scriptpubkey_len
msgdata,closing_init,last_remote_secret,secret,
msgdata,closing_init,dev_fast_gossip,bool,

Can't render this file because it has a wrong number of fields in line 4.

8
closingd/closingd.c

@ -569,7 +569,7 @@ int main(int argc, char *argv[])
struct amount_sat min_fee_to_accept, commitment_fee, offer[NUM_SIDES];
struct feerange feerange;
enum side funder;
u8 *scriptpubkey[NUM_SIDES], *funding_wscript, *final_scriptpubkey;
u8 *scriptpubkey[NUM_SIDES], *funding_wscript;
struct channel_id channel_id;
bool reconnected;
u64 next_index[NUM_SIDES], revocations_received;
@ -602,7 +602,6 @@ int main(int argc, char *argv[])
&next_index[REMOTE],
&revocations_received,
&channel_reestablish,
&final_scriptpubkey,
&last_remote_per_commit_secret,
&dev_fast_gossip))
master_badmsg(WIRE_CLOSING_INIT, msg);
@ -626,12 +625,9 @@ int main(int argc, char *argv[])
if (reconnected)
do_reconnect(pps, &channel_id,
next_index, revocations_received,
channel_reestablish, final_scriptpubkey,
channel_reestablish, scriptpubkey[LOCAL],
&last_remote_per_commit_secret);
/* We don't need this any more */
tal_free(final_scriptpubkey);
peer_billboard(true, "Negotiating closing fee between %s"
" and %s satoshi (ideal %s)",
type_to_string(tmpctx, struct amount_sat,

2
lightningd/closing_control.c

@ -299,8 +299,6 @@ void peer_start_closingd(struct channel *channel,
channel->next_index[REMOTE],
num_revocations,
channel_reestablish,
p2wpkh_for_keyidx(tmpctx, ld,
channel->final_key_idx),
&last_remote_per_commit_secret,
IFDEV(ld->dev_fast_gossip, false));

Loading…
Cancel
Save