itest+lntest: fix flake in MPP-related tests

This commit is contained in:
yyforyongyu committed 2024-12-20 19:38:09 +08:00
1 parent fb59669ae8
commit cfb5713cda
2 files changed
+31 -3

No files matched your search

+4 -3
View File
@@ -1513,13 +1513,14 @@ func (h *HarnessTest) AssertNumHTLCsAndStage(hn *node.HarnessNode,
lnutils.SpewLogClosure(target.PendingHtlcs)())
}
for i, htlc := range target.PendingHtlcs {
for _, htlc := range target.PendingHtlcs {
if htlc.Stage == stage {
continue
}
return fmt.Errorf("HTLC %d got stage: %v, "+
"want stage: %v", i, htlc.Stage, stage)
return fmt.Errorf("HTLC %s got stage: %v, "+
"want stage: %v", htlc.Outpoint, htlc.Stage,
stage)
}
return nil