mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user