mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-10 13:13:27 +01:00
set max block size for gbt
This commit is contained in:
parent
2a2b36d425
commit
eba62452c0
@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
#define CRYPTONOTE_MAX_BLOCK_NUMBER 500000000
|
#define CRYPTONOTE_MAX_BLOCK_NUMBER 500000000
|
||||||
#define CRYPTONOTE_MAX_BLOCK_SIZE 500000000 // block header blob limit, never used!
|
#define CRYPTONOTE_MAX_BLOCK_SIZE 500000000 // block header blob limit, never used!
|
||||||
|
#define CRYPTONOTE_GETBLOCKTEMPLATE_MAX_BLOCK_SIZE 196608 //size of block (bytes) that is the maximum that miners will produce
|
||||||
#define CRYPTONOTE_MAX_TX_SIZE 1000000000
|
#define CRYPTONOTE_MAX_TX_SIZE 1000000000
|
||||||
#define CRYPTONOTE_PUBLIC_ADDRESS_TEXTBLOB_VER 0
|
#define CRYPTONOTE_PUBLIC_ADDRESS_TEXTBLOB_VER 0
|
||||||
#define CRYPTONOTE_PUBLIC_ADDRESS_BASE58_PREFIX 18 // addresses start with "4"
|
#define CRYPTONOTE_PUBLIC_ADDRESS_BASE58_PREFIX 18 // addresses start with "4"
|
||||||
|
@ -424,6 +424,14 @@ namespace cryptonote
|
|||||||
if (tx.second.blob_size > upper_transaction_size_limit)
|
if (tx.second.blob_size > upper_transaction_size_limit)
|
||||||
continue;
|
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
|
// If adding this tx will make the block size
|
||||||
// greater than 130% of the median, reject the
|
// greater than 130% of the median, reject the
|
||||||
// tx; this will keep down largely punitive tx
|
// tx; this will keep down largely punitive tx
|
||||||
|
Loading…
Reference in New Issue
Block a user