mirror of
https://github.com/monero-project/monero.git
synced 2024-11-17 16:27:39 +00:00
core: early out in handle_incoming_tx if already in pool or blockchain
This commit is contained in:
parent
6cc7d26140
commit
7c3f79cb9f
1 changed files with 12 additions and 0 deletions
|
@ -496,6 +496,18 @@ namespace cryptonote
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(m_mempool.have_tx(tx_hash))
|
||||||
|
{
|
||||||
|
LOG_PRINT_L2("tx " << tx_hash << "already have transaction in tx_pool");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(m_blockchain_storage.have_tx(tx_hash))
|
||||||
|
{
|
||||||
|
LOG_PRINT_L2("tx " << tx_hash << " already have transaction in blockchain");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if(!check_tx_syntax(tx))
|
if(!check_tx_syntax(tx))
|
||||||
{
|
{
|
||||||
LOG_PRINT_L1("WRONG TRANSACTION BLOB, Failed to check tx " << tx_hash << " syntax, rejected");
|
LOG_PRINT_L1("WRONG TRANSACTION BLOB, Failed to check tx " << tx_hash << " syntax, rejected");
|
||||||
|
|
Loading…
Reference in a new issue