multi: Add itest for funding timeout
This commit adds an integration test that verifies the funding timeout behavior in the funding manager, in dev/integration test. Signed-off-by: Nishant Bansal <nishant.bansal.282003@gmail.com>
This commit is contained in:
9 files changed
+132
-22
No files matched your search
+14
-2
@@ -3850,9 +3850,21 @@ func (r *rpcServer) fetchPendingOpenChannels() (pendingOpenChannels, error) {
|
||||
commitBaseWeight := blockchain.GetTransactionWeight(utx)
|
||||
commitWeight := commitBaseWeight + witnessWeight
|
||||
|
||||
// The value of waitBlocksForFundingConf is adjusted in a
|
||||
// development environment to enhance test capabilities.
|
||||
// Otherwise, it is set to DefaultMaxWaitNumBlocksFundingConf.
|
||||
waitBlocksForFundingConf := uint32(
|
||||
lncfg.DefaultMaxWaitNumBlocksFundingConf,
|
||||
)
|
||||
|
||||
if lncfg.IsDevBuild() {
|
||||
waitBlocksForFundingConf =
|
||||
r.cfg.Dev.GetMaxWaitNumBlocksFundingConf()
|
||||
}
|
||||
|
||||
// FundingExpiryBlocks is the distance from the current block
|
||||
// height to the broadcast height + MaxWaitNumBlocksFundingConf.
|
||||
maxFundingHeight := funding.MaxWaitNumBlocksFundingConf +
|
||||
// height to the broadcast height + waitBlocksForFundingConf.
|
||||
maxFundingHeight := waitBlocksForFundingConf +
|
||||
pendingChan.BroadcastHeight()
|
||||
fundingExpiryBlocks := int32(maxFundingHeight) - currentHeight
|
||||
|
||||
|
||||
Reference in new issue
Block a user