diff --git a/src/Makefile.am b/src/Makefile.am --- a/src/Makefile.am +++ b/src/Makefile.am @@ -169,6 +169,7 @@ noui.h \ outputtype.h \ policy/fees.h \ + policy/mempool.h \ policy/policy.h \ pow.h \ protocol.h \ diff --git a/src/init.cpp b/src/init.cpp --- a/src/init.cpp +++ b/src/init.cpp @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include diff --git a/src/policy/mempool.h b/src/policy/mempool.h new file mode 100644 --- /dev/null +++ b/src/policy/mempool.h @@ -0,0 +1,22 @@ +// Copyright (c) 2020 The Bitcoin developers +// Distributed under the MIT software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. +#ifndef BITCOIN_POLICY_MEMPOOL_H +#define BITCOIN_POLICY_MEMPOOL_H + +/** Default for -limitancestorcount, max number of in-mempool ancestors */ +static const unsigned int DEFAULT_ANCESTOR_LIMIT = 25; +/** + * Default for -limitancestorsize, maximum kilobytes of tx + all in-mempool + * ancestors. + */ +static const unsigned int DEFAULT_ANCESTOR_SIZE_LIMIT = 101; +/** Default for -limitdescendantcount, max number of in-mempool descendants */ +static const unsigned int DEFAULT_DESCENDANT_LIMIT = 25; +/** + * Default for -limitdescendantsize, maximum kilobytes of in-mempool + * descendants. + */ +static const unsigned int DEFAULT_DESCENDANT_SIZE_LIMIT = 101; + +#endif // BITCOIN_POLICY_MEMPOOL_H diff --git a/src/validation.h b/src/validation.h --- a/src/validation.h +++ b/src/validation.h @@ -77,20 +77,6 @@ * -maxtxfee will warn if called with a higher fee than this amount (in satoshis */ static const Amount HIGH_MAX_TX_FEE(100 * HIGH_TX_FEE_PER_KB); -/** Default for -limitancestorcount, max number of in-mempool ancestors */ -static const unsigned int DEFAULT_ANCESTOR_LIMIT = 25; -/** - * Default for -limitancestorsize, maximum kilobytes of tx + all in-mempool - * ancestors. - */ -static const unsigned int DEFAULT_ANCESTOR_SIZE_LIMIT = 101; -/** Default for -limitdescendantcount, max number of in-mempool descendants */ -static const unsigned int DEFAULT_DESCENDANT_LIMIT = 25; -/** - * Default for -limitdescendantsize, maximum kilobytes of in-mempool - * descendants. - */ -static const unsigned int DEFAULT_DESCENDANT_SIZE_LIMIT = 101; /** * Default for -mempoolexpiry, expiration time for mempool transactions in * hours. diff --git a/src/validation.cpp b/src/validation.cpp --- a/src/validation.cpp +++ b/src/validation.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include