mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-06 07:34:21 +01:00
options: Add --dev-max-funding-unconfirmed-blocks.
Maximum number of blocks where funding tx is unconfirmed, after which if we are the fundee, we forget the channel.
This commit is contained in:
committed by
Christian Decker
parent
097a8e72d1
commit
e95143af9a
@@ -341,12 +341,7 @@ is_fundee_should_forget(struct lightningd *ld,
|
||||
struct channel *channel,
|
||||
u32 block_height)
|
||||
{
|
||||
u32 max_no_funding_tx = 2016;
|
||||
|
||||
/* FIXME: we should be getting max_no_funding_tx
|
||||
* from an lightningd option, which is why we get
|
||||
* it as an argument. */
|
||||
(void) ld;
|
||||
u32 max_funding_unconfirmed = ld->max_funding_unconfirmed;
|
||||
|
||||
/* BOLT #2:
|
||||
*
|
||||
@@ -369,7 +364,7 @@ is_fundee_should_forget(struct lightningd *ld,
|
||||
return false;
|
||||
|
||||
/* Timeout in blocks not yet reached. */
|
||||
if (block_height - channel->first_blocknum < max_no_funding_tx)
|
||||
if (block_height - channel->first_blocknum < max_funding_unconfirmed)
|
||||
return false;
|
||||
|
||||
/* Ah forget it! */
|
||||
|
||||
Reference in New Issue
Block a user