mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-02-22 22:25:24 +01:00
htlcswitch: use ticker.New instead of NewForce for test link
NewForce's Pause method doesn't reset the ticker, so a test flake would occur in TestChannelLinkCancelFullCommitment where PendingCommitTicker.Pause() was called, but the underlying timer was still ticking. When PendingCommitTicker.Resume() was called, an unlucky Ticks() call could end up firing, leading to the link being shut down.
This commit is contained in:
parent
49eeabf2a4
commit
bfcf0830ff
1 changed files with 1 additions and 1 deletions
|
@ -1166,7 +1166,7 @@ func (h *hopNetwork) createChannelLink(server, peer *mockServer,
|
|||
BatchSize: 10,
|
||||
BatchTicker: ticker.NewForce(testBatchTimeout),
|
||||
FwdPkgGCTicker: ticker.NewForce(fwdPkgTimeout),
|
||||
PendingCommitTicker: ticker.NewForce(2 * time.Minute),
|
||||
PendingCommitTicker: ticker.New(2 * time.Minute),
|
||||
MinFeeUpdateTimeout: minFeeUpdateTimeout,
|
||||
MaxFeeUpdateTimeout: maxFeeUpdateTimeout,
|
||||
OnChannelFailure: func(lnwire.ChannelID, lnwire.ShortChannelID, LinkFailureError) {},
|
||||
|
|
Loading…
Add table
Reference in a new issue