mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-22 06:41:44 +01:00
bkpr: wire up our chain fee accting to chain event reception
When we get a chain event, check to see if this updates any onchain fee records that we have.
This commit is contained in:
parent
721ceb7519
commit
b7d85f1d0b
1 changed files with 9 additions and 1 deletions
|
@ -184,9 +184,17 @@ static const char *parse_and_log_chain_move(struct command *cmd,
|
||||||
maybe_update_account(db, acct, e, tags);
|
maybe_update_account(db, acct, e, tags);
|
||||||
|
|
||||||
/* Can we calculate any onchain fees now? */
|
/* Can we calculate any onchain fees now? */
|
||||||
|
err = maybe_update_onchain_fees(cmd, db,
|
||||||
|
e->spending_txid ?
|
||||||
|
e->spending_txid :
|
||||||
|
&e->outpoint.txid);
|
||||||
|
|
||||||
|
db_commit_transaction(db);
|
||||||
|
|
||||||
|
if (err)
|
||||||
|
return err;
|
||||||
|
|
||||||
/* FIXME: maybe mark channel as 'onchain_resolved' */
|
/* FIXME: maybe mark channel as 'onchain_resolved' */
|
||||||
db_commit_transaction(db);
|
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue