aboutsummaryrefslogtreecommitdiff
path: root/src/validation.h
diff options
context:
space:
mode:
authorSuhas Daftuar <sdaftuar@gmail.com>2016-11-03 14:45:10 -0400
committerSuhas Daftuar <sdaftuar@gmail.com>2017-05-04 16:50:52 -0400
commit71f1903353e6452fd4e80e8ae698a49d16a7b61d (patch)
treeee04e10dccc7d9bfe1a5399ef955f883322e13ed /src/validation.h
parent9decd648ac0a1f7f525bca06cd42e0f6525b759a (diff)
Store disconnected block transactions outside mempool during reorg
Rather than re-add disconnected block transactions back to the mempool immediately, store them in a separate disconnectpool for later processing, because we expect most such transactions to reappear in the chain that is still to be connected (and thus we can avoid the work of reprocessing those transactions through the mempool altogether).
Diffstat (limited to 'src/validation.h')
-rw-r--r--src/validation.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/validation.h b/src/validation.h
index c046ba9238..8c91a3806d 100644
--- a/src/validation.h
+++ b/src/validation.h
@@ -69,6 +69,8 @@ static const unsigned int DEFAULT_DESCENDANT_LIMIT = 25;
static const unsigned int DEFAULT_DESCENDANT_SIZE_LIMIT = 101;
/** Default for -mempoolexpiry, expiration time for mempool transactions in hours */
static const unsigned int DEFAULT_MEMPOOL_EXPIRY = 336;
+/** Maximum kilobytes for transactions to store for processing during reorg */
+static const unsigned int MAX_DISCONNECTED_TX_POOL_SIZE = 20000;
/** The maximum size of a blk?????.dat file (since 0.8) */
static const unsigned int MAX_BLOCKFILE_SIZE = 0x8000000; // 128 MiB
/** The pre-allocation chunk size for blk?????.dat files (since 0.8) */