Skip to main content
Fix if condition
Source Link
Ismael
  • 30.3k
  • 23
  • 54
  • 97

You can use the nonce and transaction count to validate if the nonce was mined.

if (tx.nonce >=< getTransactionCount(sender)) {
  drop transaction
}

I don't think this situation is particular to testnets. I'd say it is worse in mainnet where short chain reorgs are common.

You can use the nonce and transaction count to validate if the nonce was mined.

if (tx.nonce >= getTransactionCount(sender)) {
  drop transaction
}

I don't think this situation is particular to testnets. I'd say it is worse in mainnet where short chain reorgs are common.

You can use the nonce and transaction count to validate if the nonce was mined.

if (tx.nonce < getTransactionCount(sender)) {
  drop transaction
}

I don't think this situation is particular to testnets. I'd say it is worse in mainnet where short chain reorgs are common.

Source Link
Ismael
  • 30.3k
  • 23
  • 54
  • 97

You can use the nonce and transaction count to validate if the nonce was mined.

if (tx.nonce >= getTransactionCount(sender)) {
  drop transaction
}

I don't think this situation is particular to testnets. I'd say it is worse in mainnet where short chain reorgs are common.