mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-26 09:14:20 +01:00
lightningd: keep last valid tx, and its signature.
This avoids us having to reconstruct it. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -489,6 +489,8 @@ void add_peer(struct lightningd *ld, u64 unique_id,
|
||||
peer->our_msatoshi = NULL;
|
||||
peer->state = UNINITIALIZED;
|
||||
peer->channel_info = NULL;
|
||||
peer->last_tx = NULL;
|
||||
peer->last_sig = NULL;
|
||||
peer->last_was_revoke = false;
|
||||
peer->last_sent_commit = NULL;
|
||||
peer->remote_shutdown_scriptpubkey = NULL;
|
||||
|
||||
@@ -76,6 +76,10 @@ struct peer {
|
||||
/* Amount going to us, not counting unfinished HTLCs; if we have one. */
|
||||
u64 *our_msatoshi;
|
||||
|
||||
/* Last tx they gave us (if any). */
|
||||
struct bitcoin_tx *last_tx;
|
||||
secp256k1_ecdsa_signature *last_sig;
|
||||
|
||||
/* Keys for channel. */
|
||||
struct channel_info *channel_info;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user