mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-02-23 14:40:30 +01:00
itest: fix flake for neutrino backend
This commit is contained in:
parent
3a45492398
commit
762e59d78c
1 changed files with 16 additions and 0 deletions
|
@ -340,6 +340,22 @@ func runChannelForceClosureTest(ht *lntest.HarnessTest,
|
|||
"sweep transaction not spending from commit")
|
||||
}
|
||||
|
||||
// For neutrino backend, due to it has no mempool, we need to check the
|
||||
// sweep tx has already been saved to db before restarting. This is due
|
||||
// to the possible race,
|
||||
// - the fee bumper returns a TxPublished event, which is received by
|
||||
// the sweeper and the sweep tx is saved to db.
|
||||
// - the sweeper receives a shutdown signal before it receives the
|
||||
// above event.
|
||||
//
|
||||
// TODO(yy): fix the above race.
|
||||
if ht.IsNeutrinoBackend() {
|
||||
// Check that we can find the commitment sweep in our set of
|
||||
// known sweeps, using the simple transaction id ListSweeps
|
||||
// output.
|
||||
ht.AssertSweepFound(alice, sweepingTXID.String(), false, 0)
|
||||
}
|
||||
|
||||
// Restart Alice to ensure that she resumes watching the finalized
|
||||
// commitment sweep txid.
|
||||
ht.RestartNode(alice)
|
||||
|
|
Loading…
Add table
Reference in a new issue