aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core
diff options
context:
space:
mode:
authormydesktop <dev.mc2@gmail.com>2014-06-26 16:42:24 -0400
committermydesktop <dev.mc2@gmail.com>2014-06-26 16:42:24 -0400
commiteba62452c007623bf559e836cbe7e9f2f66a35e9 (patch)
tree51802c04a0379a29747d4fb660f9643dfc753ab6 /src/cryptonote_core
parentfix function typo (diff)
downloadmonero-eba62452c007623bf559e836cbe7e9f2f66a35e9.tar.xz
set max block size for gbt
Diffstat (limited to 'src/cryptonote_core')
-rw-r--r--src/cryptonote_core/tx_pool.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/cryptonote_core/tx_pool.cpp b/src/cryptonote_core/tx_pool.cpp
index 1778c590a..bf932404a 100644
--- a/src/cryptonote_core/tx_pool.cpp
+++ b/src/cryptonote_core/tx_pool.cpp
@@ -425,6 +425,14 @@ namespace cryptonote
continue;
// If adding this tx will make the block size
+ // greater than CRYPTONOTE_GETBLOCKTEMPLATE_MAX
+ // _BLOCK_SIZE bytes, reject the tx; this will
+ // keep block sizes from becoming too unwieldly
+ // to propagate at 60s block times.
+ if ( (total_size + tx.second.blob_size) > CRYPTONOTE_GETBLOCKTEMPLATE_MAX_BLOCK_SIZE )
+ continue;
+
+ // If adding this tx will make the block size
// greater than 130% of the median, reject the
// tx; this will keep down largely punitive tx
// from being included