mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 01:43:36 +01:00
channeld: don't forget channels that we've put funds into
Typically we forget a channel if 2016 blocks have passed and the funding transaction hasn't been mined yet, however we SHOULD NOT forget these channels if we've got funds in them!
This commit is contained in:
parent
03ccebc296
commit
0dde74f99e
@ -773,6 +773,10 @@ is_fundee_should_forget(struct lightningd *ld,
|
||||
if (block_height - channel->first_blocknum < max_funding_unconfirmed)
|
||||
return false;
|
||||
|
||||
/* If we've got funds in the channel, don't forget it */
|
||||
if (!amount_sat_zero(channel->our_funds))
|
||||
return false;
|
||||
|
||||
/* Ah forget it! */
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user