Merge pull request #3098 from cfromknecht/increase-funding-timeout
fundingmanager: bump max non-initiator funding timeout to 2 weeks
This commit is contained in:
commit
437f83998e
@ -49,9 +49,9 @@ const (
|
|||||||
maxLtcRemoteDelay uint16 = 8064
|
maxLtcRemoteDelay uint16 = 8064
|
||||||
|
|
||||||
// maxWaitNumBlocksFundingConf is the maximum number of blocks to wait
|
// maxWaitNumBlocksFundingConf is the maximum number of blocks to wait
|
||||||
// for the funding transaction to be confirmed before forgetting about
|
// for the funding transaction to be confirmed before forgetting
|
||||||
// the channel. 288 blocks is ~48 hrs
|
// channels that aren't initiated by us. 2016 blocks is ~2 weeks.
|
||||||
maxWaitNumBlocksFundingConf = 288
|
maxWaitNumBlocksFundingConf = 2016
|
||||||
|
|
||||||
// minChanFundingSize is the smallest channel that we'll allow to be
|
// minChanFundingSize is the smallest channel that we'll allow to be
|
||||||
// created over the RPC interface.
|
// created over the RPC interface.
|
||||||
|
@ -1597,17 +1597,17 @@ func TestFundingManagerFundingTimeout(t *testing.T) {
|
|||||||
len(pendingChannels))
|
len(pendingChannels))
|
||||||
}
|
}
|
||||||
|
|
||||||
// We expect Bob to forget the channel after 288 blocks (48 hours), so
|
// We expect Bob to forget the channel after 2016 blocks (2 weeks), so
|
||||||
// mine 287, and check that it is still pending.
|
// mine 2016-1, and check that it is still pending.
|
||||||
bob.mockNotifier.epochChan <- &chainntnfs.BlockEpoch{
|
bob.mockNotifier.epochChan <- &chainntnfs.BlockEpoch{
|
||||||
Height: fundingBroadcastHeight + 287,
|
Height: fundingBroadcastHeight + maxWaitNumBlocksFundingConf - 1,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Bob should still be waiting for the channel to open.
|
// Bob should still be waiting for the channel to open.
|
||||||
assertNumPendingChannelsRemains(t, bob, 1)
|
assertNumPendingChannelsRemains(t, bob, 1)
|
||||||
|
|
||||||
bob.mockNotifier.epochChan <- &chainntnfs.BlockEpoch{
|
bob.mockNotifier.epochChan <- &chainntnfs.BlockEpoch{
|
||||||
Height: fundingBroadcastHeight + 288,
|
Height: fundingBroadcastHeight + maxWaitNumBlocksFundingConf,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Bob should have sent an Error message to Alice.
|
// Bob should have sent an Error message to Alice.
|
||||||
|
Loading…
Reference in New Issue
Block a user