Skip to content

Commit

Permalink
Add test for resetNonce()
Browse files Browse the repository at this point in the history
Signed-off-by: Junsung Cho <junsung@directional.net>
  • Loading branch information
junsung-cho committed Aug 8, 2024
1 parent f34ea4b commit acbfecd
Showing 1 changed file with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,23 @@ public void testTransactionPolling() throws Exception {
assertTrue(transactionReceipts.isEmpty());
}

@Test
public void testTransactionResetNonce() throws Exception {
FastRawTransactionManager transactionManager =
new FastRawTransactionManager(
web3j,
ALICE,
new PollingTransactionReceiptProcessor(
web3j, POLLING_FREQUENCY, DEFAULT_POLLING_ATTEMPTS_PER_TX_HASH));

Transfer transfer = new Transfer(web3j, transactionManager);
BigInteger gasPrice = transfer.requestCurrentGasPrice();

createTransaction(transfer, gasPrice).send();
transactionManager.resetNonce();
createTransaction(transfer, gasPrice).send();
}

@Test
public void testTransactionQueuing() throws Exception {

Expand Down

0 comments on commit acbfecd

Please sign in to comment.