aboutsummaryrefslogtreecommitdiff
path: root/src/main.h
diff options
context:
space:
mode:
authorSuhas Daftuar <sdaftuar@gmail.com>2015-07-15 14:47:45 -0400
committerSuhas Daftuar <sdaftuar@chaincode.com>2015-09-19 13:25:48 -0400
commit5add7a74a672cb12b0a2a630d318d9bc64dd0f77 (patch)
treee8b86acba14f47100af0bbadeb748f6f6a002d58 /src/main.h
parent34628a18070064e75b35f28fd6a43d5c23832eb8 (diff)
downloadbitcoin-5add7a74a672cb12b0a2a630d318d9bc64dd0f77.tar.xz
Track transaction packages in CTxMemPoolEntry
Associate with each CTxMemPoolEntry all the size/fees of descendant mempool transactions. Sort mempool by max(feerate of entry, feerate of descendants). Update statistics on-the-fly as transactions enter or leave the mempool. Also add ancestor and descendant limiting, so that transactions can be rejected if the number or size of unconfirmed ancestors exceeds a target, or if adding a transaction would cause some other mempool entry to have too many (or too large) a set of unconfirmed in- mempool descendants.
Diffstat (limited to 'src/main.h')
-rw-r--r--src/main.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main.h b/src/main.h
index e3479b4b3b..a6001eed8f 100644
--- a/src/main.h
+++ b/src/main.h
@@ -43,6 +43,14 @@ struct CNodeStateStats;
static const bool DEFAULT_ALERTS = true;
/** Default for -maxorphantx, maximum number of orphan transactions kept in memory */
static const unsigned int DEFAULT_MAX_ORPHAN_TRANSACTIONS = 100;
+/** Default for -limitancestorcount, max number of in-mempool ancestors */
+static const unsigned int DEFAULT_ANCESTOR_LIMIT = 100;
+/** Default for -limitancestorsize, maximum kilobytes of tx + all in-mempool ancestors */
+static const unsigned int DEFAULT_ANCESTOR_SIZE_LIMIT = 900;
+/** Default for -limitdescendantcount, max number of in-mempool descendants */
+static const unsigned int DEFAULT_DESCENDANT_LIMIT = 1000;
+/** Default for -limitdescendantsize, maximum kilobytes of in-mempool descendants */
+static const unsigned int DEFAULT_DESCENDANT_SIZE_LIMIT = 2500;
/** 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) */