itest+lntest: stop using pointer to chainhash.Hash

This commit fixes the methods used in `lntest` so they stop using
pointers to chainhash.
This commit is contained in:
yyforyongyu
2024-10-17 07:14:51 +08:00
parent af6b88a9f6
commit ed3cb26188
16 changed files with 99 additions and 93 deletions

View File

@@ -534,7 +534,7 @@ func (h *HarnessTest) AssertTopologyChannelClosed(hn *node.HarnessNode,
// by consuming a message from the passed close channel stream. Returns the
// closing txid if found.
func (h HarnessTest) WaitForChannelCloseEvent(
stream rpc.CloseChanClient) *chainhash.Hash {
stream rpc.CloseChanClient) chainhash.Hash {
// Consume one event.
event, err := h.ReceiveCloseChannelUpdate(stream)
@@ -548,7 +548,7 @@ func (h HarnessTest) WaitForChannelCloseEvent(
require.NoErrorf(h, err, "wrong format found in closing txid: %v",
resp.ChanClose.ClosingTxid)
return txid
return *txid
}
// AssertNumWaitingClose checks that a PendingChannels response from the node
@@ -634,7 +634,7 @@ func (h *HarnessTest) AssertNumPendingForceClose(hn *node.HarnessNode,
// - assert the node has seen the channel close update.
func (h *HarnessTest) AssertStreamChannelCoopClosed(hn *node.HarnessNode,
cp *lnrpc.ChannelPoint, anchors bool,
stream rpc.CloseChanClient) *chainhash.Hash {
stream rpc.CloseChanClient) chainhash.Hash {
// Assert the channel is waiting close.
resp := h.AssertChannelWaitingClose(hn, cp)
@@ -682,7 +682,7 @@ func (h *HarnessTest) AssertStreamChannelCoopClosed(hn *node.HarnessNode,
// confirmed.
func (h *HarnessTest) AssertStreamChannelForceClosed(hn *node.HarnessNode,
cp *lnrpc.ChannelPoint, anchorSweep bool,
stream rpc.CloseChanClient) *chainhash.Hash {
stream rpc.CloseChanClient) chainhash.Hash {
// Assert the channel is waiting close.
resp := h.AssertChannelWaitingClose(hn, cp)