Skip to content

Commit

Permalink
<fix>(txpool): fix txpool insert nonce logic error.
Browse files Browse the repository at this point in the history
  • Loading branch information
kyonRay committed Sep 25, 2024
1 parent f767153 commit 3eb2240
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bcos-txpool/bcos-txpool/txpool/validator/TxValidator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,11 @@ TransactionStatus TxValidator::verify(bcos::protocol::Transaction::ConstPtr _tx)
_tx->setSystemTx(true);
}
m_txPoolNonceChecker->insert(_tx->nonce());
task::syncWait(m_web3NonceChecker->insertMemoryNonce(std::string(_tx->sender()), _tx->nonce()));
if (_tx->type() == static_cast<uint8_t>(TransactionType::Web3Transaction))
{
task::syncWait(
m_web3NonceChecker->insertMemoryNonce(std::string(_tx->sender()), _tx->nonce()));
}
return TransactionStatus::None;
}

Expand Down

0 comments on commit 3eb2240

Please sign in to comment.