Skip to content

Commit db9eaa7

Browse files
committed
itest: add custom channel integration test
1 parent b9789cc commit db9eaa7

File tree

9 files changed

+3352
-9
lines changed

9 files changed

+3352
-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-20170628155309-84c8d2346e9f
99
github.com/btcsuite/btcwallet/walletdb v1.4.2
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.16.0
1213
github.com/improbable-eng/grpc-web v0.12.0
@@ -74,7 +75,6 @@ require (
7475
github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf // indirect
7576
github.com/coreos/go-systemd/v22 v22.3.2 // indirect
7677
github.com/cpuguy83/go-md2man/v2 v2.0.0 // indirect
77-
github.com/davecgh/go-spew v1.1.1 // indirect
7878
github.com/decred/dcrd/crypto/blake256 v1.0.1 // indirect
7979
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect
8080
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)