Skip to content

Commit 2fa4b07

Browse files
committed
itest: add custom channel integration test
1 parent fba9c28 commit 2fa4b07

File tree

5 files changed

+1353
-6
lines changed

5 files changed

+1353
-6
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
@@ -69,7 +70,6 @@ require (
6970
github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf // indirect
7071
github.com/coreos/go-systemd/v22 v22.3.2 // indirect
7172
github.com/cpuguy83/go-md2man/v2 v2.0.0 // indirect
72-
github.com/davecgh/go-spew v1.1.1 // indirect
7373
github.com/decred/dcrd/crypto/blake256 v1.0.1 // indirect
7474
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect
7575
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)