lntest: fix commitment TX not found in mempool error
This commit fixes an old flake in the neutrino anchor output tests. It turns out that sometimes with Neutrino we don't have enough UTXOs in our wallet to sweep both the local and remote anchor. This is very likely a timing issue, we need to give the wallet more time to catch up with the chain and process all transactions to find unspent outputs. We address this two-fold: We add an additional UTXO to Alice. And then we also make sure we detect both UTXOs properly after restarting.
This commit is contained in:
3 files changed
+48
-7
No files matched your search
+9
-1
@@ -772,7 +772,15 @@ func (n *NetworkHarness) RestartNode(node *HarnessNode, callback func() error,
|
||||
unlockReq.RecoveryWindow = 1000
|
||||
}
|
||||
|
||||
return node.Unlock(context.Background(), unlockReq)
|
||||
if err := node.Unlock(context.Background(), unlockReq); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// Give the node some time to catch up with the chain before we continue
|
||||
// with the tests.
|
||||
ctxc, done := context.WithTimeout(context.Background(), DefaultTimeout)
|
||||
defer done()
|
||||
return node.WaitForBlockchainSync(ctxc)
|
||||
}
|
||||
|
||||
// RestartNodeNoUnlock attempts to restart a lightning node by shutting it down
|
||||
|
||||
Reference in new issue
Block a user