aboutsummaryrefslogtreecommitdiff
path: root/src/validation.cpp
diff options
context:
space:
mode:
authorJohn Newbery <john@johnnewbery.com>2019-11-05 14:18:08 -0500
committerJohn Newbery <john@johnnewbery.com>2020-04-23 12:54:06 -0400
commit0109622b08887ed01a30911477ce4b8f266d4b4a (patch)
tree7e27b418071ae0a12e041a16f378c52434aaf962 /src/validation.cpp
parentb8580cacc70764ba5a48e3defb864d75e6c28626 (diff)
downloadbitcoin-0109622b08887ed01a30911477ce4b8f266d4b4a.tar.xz
[validation] Move validation-only consts to validation.cpp
Diffstat (limited to 'src/validation.cpp')
-rw-r--r--src/validation.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/validation.cpp b/src/validation.cpp
index fb635b4202..25975e3e31 100644
--- a/src/validation.cpp
+++ b/src/validation.cpp
@@ -59,6 +59,25 @@
#define MICRO 0.000001
#define MILLI 0.001
+/**
+ * An extra transaction can be added to a package, as long as it only has one
+ * ancestor and is no larger than this. Not really any reason to make this
+ * configurable as it doesn't materially change DoS parameters.
+ */
+static const unsigned int EXTRA_DESCENDANT_TX_SIZE_LIMIT = 10000;
+/** Maximum kilobytes for transactions to store for processing during reorg */
+static const unsigned int MAX_DISCONNECTED_TX_POOL_SIZE = 20000;
+/** The pre-allocation chunk size for blk?????.dat files (since 0.8) */
+static const unsigned int BLOCKFILE_CHUNK_SIZE = 0x1000000; // 16 MiB
+/** The pre-allocation chunk size for rev?????.dat files (since 0.8) */
+static const unsigned int UNDOFILE_CHUNK_SIZE = 0x100000; // 1 MiB
+/** Time to wait (in seconds) between writing blocks/block index to disk. */
+static const unsigned int DATABASE_WRITE_INTERVAL = 60 * 60;
+/** Time to wait (in seconds) between flushing chainstate to disk. */
+static const unsigned int DATABASE_FLUSH_INTERVAL = 24 * 60 * 60;
+/** Maximum age of our tip in seconds for us to be considered current for fee estimation */
+static const int64_t MAX_FEE_ESTIMATION_TIP_AGE = 3 * 60 * 60;
+
bool CBlockIndexWorkComparator::operator()(const CBlockIndex *pa, const CBlockIndex *pb) const {
// First sort by most total work, ...
if (pa->nChainWork > pb->nChainWork) return false;