Closed: Cleanup for wire_closing_init

`final_scriptpubkey` is repeated with `funding_pubkey[LOCAL]`.
This commit is contained in:
trueptolemy
2019-09-30 03:12:26 +08:00
committed by neil saitug
parent 75e946d256
commit a1204a0b94
3 changed files with 2 additions and 10 deletions

View File

@@ -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,
1 #include <common/cryptomsg.h>
27 msgdata,closing_init,revocations_received,u64,
28 msgdata,closing_init,channel_reestablish_len,u16,
29 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
30 msgdata,closing_init,last_remote_secret,secret,
31 msgdata,closing_init,dev_fast_gossip,bool,
32 # We received an offer, save signature.

View File

@@ -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,

View File

@@ -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));