Skip to content

Commit 5ca94a6

Browse files
committed
itest: make WaitForNTxsInMempool public
We make the WaitForNTxsInMempool function public as it's going to be needed in the mintV2 loadtest.
1 parent ba8d596 commit 5ca94a6

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

itest/assets_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ func testMintBatchResume(t *harnessTest) {
183183
require.NoError(t.t, t.tapd.stop(false))
184184
require.NoError(t.t, t.tapd.start(false))
185185

186-
hashes, err := waitForNTxsInMempool(
186+
hashes, err := WaitForNTxsInMempool(
187187
t.lndHarness.Miner().Client, 1, defaultWaitTimeout,
188188
)
189189
require.NoError(t.t, err)

itest/test_harness.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -476,10 +476,10 @@ func isMempoolEmpty(miner *rpcclient.Client, timeout time.Duration) (bool,
476476
}
477477
}
478478

479-
// waitForNTxsInMempool polls until finding the desired number of transactions
479+
// WaitForNTxsInMempool polls until finding the desired number of transactions
480480
// in the provided miner's mempool. An error is returned if this number is not
481481
// met after the given timeout.
482-
func waitForNTxsInMempool(miner *rpcclient.Client, n int,
482+
func WaitForNTxsInMempool(miner *rpcclient.Client, n int,
483483
timeout time.Duration) ([]*chainhash.Hash, error) {
484484

485485
breakTimeout := time.After(timeout)

itest/utils.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ func MineBlocks(t *testing.T, client *rpcclient.Client,
142142
var txids []*chainhash.Hash
143143
var err error
144144
if numTxs > 0 {
145-
txids, err = waitForNTxsInMempool(
145+
txids, err = WaitForNTxsInMempool(
146146
client, numTxs, minerMempoolTimeout,
147147
)
148148
if err != nil {
@@ -386,7 +386,7 @@ func FinalizeBatchUnconfirmed(t *testing.T, minerClient *rpcclient.Client,
386386
batchResp.Batch.BatchKey,
387387
mintrpc.BatchState_BATCH_STATE_BROADCAST,
388388
)
389-
hashes, err := waitForNTxsInMempool(
389+
hashes, err := WaitForNTxsInMempool(
390390
minerClient, 1, options.mintingTimeout,
391391
)
392392
require.NoError(t, err)

0 commit comments

Comments
 (0)