lntest: add node name to assertions

This commit is contained in:
yyforyongyu 2023-01-17 11:45:35 +08:00
parent 3f6315242a
commit d7c38b2c58
No known key found for this signature in database
GPG Key ID: 9BCD95C4FF296868

View File

@ -1759,7 +1759,8 @@ func (h *HarnessTest) AssertNumPayments(hn *node.HarnessNode,
return errNumNotMatched(hn.Name(), "num of payments",
num, len(payments), have+len(payments), have)
}, DefaultTimeout)
require.NoError(h, err, "timeout checking num of payments")
require.NoError(h, err, "%s: timeout checking num of payments",
hn.Name())
return payments
}
@ -1772,7 +1773,8 @@ func (h *HarnessTest) AssertNumNodeAnns(hn *node.HarnessNode,
// We will get the current number of channel updates first and add it
// to our expected number of newly created channel updates.
anns, err := hn.Watcher.WaitForNumNodeUpdates(pubkey, num)
require.NoError(h, err, "failed to assert num of channel updates")
require.NoError(h, err, "%s: failed to assert num of node anns",
hn.Name())
return anns
}
@ -1784,7 +1786,8 @@ func (h *HarnessTest) AssertNumChannelUpdates(hn *node.HarnessNode,
op := h.OutPointFromChannelPoint(chanPoint)
err := hn.Watcher.WaitForNumChannelUpdates(op, num)
require.NoError(h, err, "failed to assert num of channel updates")
require.NoError(h, err, "%s: failed to assert num of channel updates",
hn.Name())
}
// CreateBurnAddr creates a random burn address of the given type.