mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
balance_snapshot: emit balances for channels that are awaiting_lockin
9cad7d6a6a changed the behavior of `channel_active`, which slightly
broke how our balance snapshots work (we need info about channels that
aren't on-chain yet).
This patches adds AWAITING_UNILATERAL back in.
This commit is contained in:
@@ -121,7 +121,8 @@ void send_account_balance_snapshot(struct lightningd *ld, u32 blockheight)
|
|||||||
/* Add channel balances */
|
/* Add channel balances */
|
||||||
list_for_each(&ld->peers, p, list) {
|
list_for_each(&ld->peers, p, list) {
|
||||||
list_for_each(&p->channels, chan, list) {
|
list_for_each(&p->channels, chan, list) {
|
||||||
if (channel_active(chan)) {
|
if (channel_active(chan)
|
||||||
|
|| chan->state == AWAITING_UNILATERAL) {
|
||||||
bal = tal(snap, struct account_balance);
|
bal = tal(snap, struct account_balance);
|
||||||
bal->bip173_name = chainparams->lightning_hrp;
|
bal->bip173_name = chainparams->lightning_hrp;
|
||||||
bal->acct_id = type_to_string(bal,
|
bal->acct_id = type_to_string(bal,
|
||||||
|
|||||||
Reference in New Issue
Block a user