diff options
| author | Riccardo Spagni <ric@spagni.net> | 2017-01-22 11:42:15 -0500 |
|---|---|---|
| committer | Riccardo Spagni <ric@spagni.net> | 2017-01-22 11:42:15 -0500 |
| commit | ee45b7a6dbdef6f8c1216443d3e9787992c24f97 (patch) | |
| tree | 5d83569f914e2b6cac8109724d9ade8a2d664091 /src/cryptonote_core/cryptonote_core.cpp | |
| parent | e12f073f6532f78ee4d94e1d343c80c830fc7a66 (diff) | |
| parent | 7c3f79cb9fcd51ade2b25c700567bdc101250ce1 (diff) | |
| download | monzero-core-ee45b7a6dbdef6f8c1216443d3e9787992c24f97.tar.gz monzero-core-ee45b7a6dbdef6f8c1216443d3e9787992c24f97.tar.xz monzero-core-ee45b7a6dbdef6f8c1216443d3e9787992c24f97.zip | |
Merge pull request #1605
7c3f79cb core: early out in handle_incoming_tx if already in pool or blockchain (moneromooo-monero)
6cc7d261 ringct: reorder a bit to check quicker tests first (moneromooo-monero)
Diffstat (limited to 'src/cryptonote_core/cryptonote_core.cpp')
| -rw-r--r-- | src/cryptonote_core/cryptonote_core.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/cryptonote_core/cryptonote_core.cpp b/src/cryptonote_core/cryptonote_core.cpp index 5294431d6..5be25a410 100644 --- a/src/cryptonote_core/cryptonote_core.cpp +++ b/src/cryptonote_core/cryptonote_core.cpp @@ -496,6 +496,18 @@ namespace cryptonote 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)) { LOG_PRINT_L1("WRONG TRANSACTION BLOB, Failed to check tx " << tx_hash << " syntax, rejected"); |
