contractcourt: more verbose logging for anchor sweeping

This commit is contained in:
yyforyongyu committed 2021-08-19 19:33:36 +08:00
1 parent 52767a7567
commit 24e654ffc4
3 files changed
+17 -12

No files matched your search

+6 -5
View File
@@ -1613,8 +1613,9 @@ func assertActiveHtlcs(nodes []*lntest.HarnessNode, payHashes ...[]byte) error {
// Channel should have exactly the payHashes active.
if len(payHashes) != len(htlcHashes) {
return fmt.Errorf("node %x had %v htlcs active, "+
"expected %v", node.PubKey[:],
return fmt.Errorf("node [%s:%x] had %v "+
"htlcs active, expected %v",
node.Cfg.Name, node.PubKey[:],
len(htlcHashes), len(payHashes))
}
@@ -1624,9 +1625,9 @@ func assertActiveHtlcs(nodes []*lntest.HarnessNode, payHashes ...[]byte) error {
if _, ok := htlcHashes[h]; ok {
continue
}
return fmt.Errorf("node %x didn't have the "+
"payHash %v active", node.PubKey[:],
h)
return fmt.Errorf("node [%s:%x] didn't have: "+
"the payHash %v active", node.Cfg.Name,
node.PubKey[:], h)
}
}
}
+1 -2
View File
@@ -151,8 +151,7 @@ func testCommitmentTransactionDeadline(net *lntest.NetworkHarness,
t.t, checkNumWaitingCloseChannels(pendingChanResp, 1),
)
// We should see only one sweep transaction because the anchor
// sweep is skipped.
// Check our sweep transactions can be found in mempool.
sweepTxns, err := getNTxsFromMempool(
net.Miner.Client,
expectedSweepTxNum, minerMempoolTimeout,