aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core/tx_pool.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/cryptonote_core/tx_pool.cpp')
-rw-r--r--src/cryptonote_core/tx_pool.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/cryptonote_core/tx_pool.cpp b/src/cryptonote_core/tx_pool.cpp
index 2a514ceae..359ded875 100644
--- a/src/cryptonote_core/tx_pool.cpp
+++ b/src/cryptonote_core/tx_pool.cpp
@@ -219,6 +219,15 @@ namespace cryptonote
return false;
}
+ size_t tx_extra_size = tx.extra.size();
+ if (!kept_by_block && tx_extra_size > MAX_TX_EXTRA_SIZE)
+ {
+ LOG_PRINT_L1("transaction tx-extra is too big: " << tx_extra_size << " bytes, the limit is: " << MAX_TX_EXTRA_SIZE);
+ tvc.m_verifivation_failed = true;
+ tvc.m_tx_extra_too_big = true;
+ return false;
+ }
+
// if the transaction came from a block popped from the chain,
// don't check if we have its key images as spent.
// TODO: Investigate why not?