mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-30 23:53:41 +02:00
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:
16
rpcserver.go
16
rpcserver.go
@@ -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