Skip to content

Commit a768492

Browse files
committed
itest: make WaitForNTxsInMempool public
1 parent 8d4c2af commit a768492

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
@@ -472,10 +472,10 @@ func isMempoolEmpty(miner *rpcclient.Client, timeout time.Duration) (bool,
472472
}
473473
}
474474

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

481481
breakTimeout := time.After(timeout)

itest/utils.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ func MineBlocks(t *testing.T, client *rpcclient.Client,
141141
var txids []*chainhash.Hash
142142
var err error
143143
if numTxs > 0 {
144-
txids, err = waitForNTxsInMempool(
144+
txids, err = WaitForNTxsInMempool(
145145
client, numTxs, minerMempoolTimeout,
146146
)
147147
if err != nil {
@@ -384,7 +384,7 @@ func FinalizeBatchUnconfirmed(t *testing.T, minerClient *rpcclient.Client,
384384
batchResp.Batch.BatchKey,
385385
mintrpc.BatchState_BATCH_STATE_BROADCAST,
386386
)
387-
hashes, err := waitForNTxsInMempool(
387+
hashes, err := WaitForNTxsInMempool(
388388
minerClient, 1, options.mintingTimeout,
389389
)
390390
require.NoError(t, err)

0 commit comments

Comments
 (0)