mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-09 09:04:25 +01:00
peer: save minimum possible depth for anchor.
We'll save this in the database so we know where to start the chain from when we reload. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -2001,6 +2001,7 @@ static struct peer *new_peer(struct lightningd_state *dstate,
|
||||
peer->local.commit = peer->remote.commit = NULL;
|
||||
peer->local.staging_cstate = peer->remote.staging_cstate = NULL;
|
||||
|
||||
peer->anchor.min_depth = get_block_height(peer->dstate);
|
||||
htlc_map_init(&peer->htlcs);
|
||||
|
||||
/* FIXME: Attach IO logging for this peer. */
|
||||
|
||||
@@ -131,6 +131,9 @@ struct peer {
|
||||
u64 satoshis;
|
||||
u8 *witnessscript;
|
||||
|
||||
/* Minimum possible depth for anchor */
|
||||
unsigned int min_depth;
|
||||
|
||||
/* If we're creating anchor, this tells us where to source it */
|
||||
struct anchor_input *input;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user