mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-06 07:34:21 +01:00
liquidity-ads: persist channel blockheight states to disk
Adds new tables to database, backfills, basically copies the fee_rates state machine for channeld.
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include <ccan/mem/mem.h>
|
||||
#include <ccan/tal/str/str.h>
|
||||
#include <common/addr.h>
|
||||
#include <common/blockheight_states.h>
|
||||
#include <common/channel_config.h>
|
||||
#include <common/features.h>
|
||||
#include <common/fee_states.h>
|
||||
@@ -105,6 +106,7 @@ wallet_commit_channel(struct lightningd *ld,
|
||||
s64 final_key_idx;
|
||||
u64 static_remotekey_start;
|
||||
bool option_anchor_outputs;
|
||||
u32 lease_start_blockheight = 0; /* No leases on v1 */
|
||||
|
||||
/* We cannot both be the fundee *and* have a `fundchannel_start`
|
||||
* command running!
|
||||
@@ -217,6 +219,8 @@ wallet_commit_channel(struct lightningd *ld,
|
||||
NUM_SIDES, /* closer not yet known */
|
||||
uc->fc ? REASON_USER : REASON_REMOTE,
|
||||
NULL,
|
||||
take(new_height_states(NULL, uc->fc ? LOCAL : REMOTE,
|
||||
&lease_start_blockheight)),
|
||||
0, NULL, 0, 0); /* No leases on v1s */
|
||||
|
||||
/* Now we finally put it in the database. */
|
||||
|
||||
Reference in New Issue
Block a user