mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-13 18:10:25 +02:00
multi: add itest to check race between channel_ready and update_add_htlc
This commit adds a new itest case to check the race condition found in issue #7401. In order to control the funding manager's state, a new dev config for the funding manager is introduced to specify a duration we should hold before processing remote node's channel_ready message. A new development config, `DevConfig` is introduced in `lncfg` and will only have effect if built with flag `integration`. This can also be extended for future integration tests if more dev-only flags are needed.
This commit is contained in:
10
server.go
10
server.go
@@ -1276,8 +1276,18 @@ func newServer(cfg *Config, listenAddrs []net.Addr,
|
||||
return ourPolicy, err
|
||||
}
|
||||
|
||||
// Get the development config for funding manager. If we are not in
|
||||
// development mode, this would be nil.
|
||||
var devCfg *funding.DevConfig
|
||||
if lncfg.IsDevBuild() {
|
||||
devCfg = &funding.DevConfig{
|
||||
ProcessChannelReadyWait: cfg.Dev.ChannelReadyWait(),
|
||||
}
|
||||
}
|
||||
|
||||
//nolint:lll
|
||||
s.fundingMgr, err = funding.NewFundingManager(funding.Config{
|
||||
Dev: devCfg,
|
||||
NoWumboChans: !cfg.ProtocolOptions.Wumbo(),
|
||||
IDKey: nodeKeyDesc.PubKey,
|
||||
IDKeyLoc: nodeKeyDesc.KeyLocator,
|
||||
|
Reference in New Issue
Block a user