diff --git a/chainntnfs/test/test_interface.go b/chainntnfs/test/test_interface.go index 99daf54f1e..fd42b10de7 100644 --- a/chainntnfs/test/test_interface.go +++ b/chainntnfs/test/test_interface.go @@ -41,9 +41,8 @@ func testSingleConfirmationNotification(miner *rpctest.Harness, // function. txid, pkScript, err := chainntnfs.GetTestTxidAndScript(miner) require.NoError(t, err, "unable to create test tx") - if err := chainntnfs.WaitForMempoolTx(miner, txid); err != nil { - t.Fatalf("tx not relayed to miner: %v", err) - } + err = chainntnfs.WaitForMempoolTx(miner, txid) + require.NoError(t, err, "tx not relayed to miner") _, currentHeight, err := miner.Client.GetBestBlock() require.NoError(t, err, "unable to get current height") @@ -68,6 +67,11 @@ func testSingleConfirmationNotification(miner *rpctest.Harness, blockHash, err := miner.Client.Generate(1) require.NoError(t, err, "unable to generate single block") + // Assert the above tx is mined in the block. + block, err := miner.Client.GetBlock(blockHash[0]) + require.NoError(t, err) + require.Len(t, block.Transactions, 2, "block does not contain tx") + select { case confInfo := <-confIntent.Confirmed: if !confInfo.BlockHash.IsEqual(blockHash[0]) {