Skip to content

Commit 086f7a3

Browse files
committed
itest: add custom channel integration test
1 parent 8592a53 commit 086f7a3

File tree

9 files changed

+3850
-9
lines changed

9 files changed

+3850
-9
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ require (
77
github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0
88
github.com/btcsuite/btclog v0.0.0-20241003133417-09c4e92e319c
99
github.com/btcsuite/btcwallet/walletdb v1.4.4
10+
github.com/davecgh/go-spew v1.1.1
1011
github.com/go-errors/errors v1.0.1
1112
github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0
1213
github.com/improbable-eng/grpc-web v0.12.0
@@ -73,7 +74,6 @@ require (
7374
github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf // indirect
7475
github.com/coreos/go-systemd/v22 v22.3.2 // indirect
7576
github.com/cpuguy83/go-md2man/v2 v2.0.0 // indirect
76-
github.com/davecgh/go-spew v1.1.1 // indirect
7777
github.com/decred/dcrd/crypto/blake256 v1.0.1 // indirect
7878
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect
7979
github.com/decred/dcrd/lru v1.1.2 // indirect

itest/assertions.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,11 @@ func assertChannelClosed(ctx context.Context, t *harnessTest,
172172
// block.
173173
block := mineBlocks(t, net, 1, 1)[0]
174174

175-
closingTxid, err := net.WaitForChannelClose(closeUpdates)
175+
closingUpdate, err := net.WaitForChannelClose(closeUpdates)
176176
require.NoError(t.t, err, "error while waiting for channel close")
177177

178+
closingTxid, err := chainhash.NewHash(closingUpdate.ClosingTxid)
179+
require.NoError(t.t, err)
178180
assertTxInBlock(t, block, closingTxid)
179181

180182
// Finally, the transaction should no longer be in the waiting close

0 commit comments

Comments
 (0)