diff --git a/lntest/itest/test_harness.go b/lntest/itest/test_harness.go index 905eb135e..494db9d42 100644 --- a/lntest/itest/test_harness.go +++ b/lntest/itest/test_harness.go @@ -31,7 +31,7 @@ var ( "lndexec", itestLndBinary, "full path to lnd binary", ) - slowMineDelay = 50 * time.Millisecond + slowMineDelay = 20 * time.Millisecond ) const ( @@ -199,7 +199,7 @@ func waitForNTxsInMempool(miner *rpcclient.Client, n int, // mineBlocks mine 'num' of blocks and check that blocks are present in // node blockchain. numTxs should be set to the number of transactions // (excluding the coinbase) we expect to be included in the first mined block. -func mineBlocks(t *harnessTest, net *lntest.NetworkHarness, +func mineBlocksFast(t *harnessTest, net *lntest.NetworkHarness, num uint32, numTxs int) []*wire.MsgBlock { // If we expect transactions to be included in the blocks we'll mine, @@ -240,6 +240,19 @@ func mineBlocks(t *harnessTest, net *lntest.NetworkHarness, return blocks } +// mineBlocksSlow mines 'num' of blocks and checks that blocks are present in +// the mining node's blockchain. numTxs should be set to the number of +// transactions (excluding the coinbase) we expect to be included in the first +// mined block. Between each mined block an artificial delay is introduced to +// give all network participants time to catch up. +// +// NOTE: This function currently is just an alias for mineBlocksSlow. +func mineBlocks(t *harnessTest, net *lntest.NetworkHarness, + num uint32, numTxs int) []*wire.MsgBlock { + + return mineBlocksSlow(t, net, num, numTxs) +} + // mineBlocksSlow mines 'num' of blocks and checks that blocks are present in // the mining node's blockchain. numTxs should be set to the number of // transactions (excluding the coinbase) we expect to be included in the first