Skip to content

Commit da8d304

Browse files
CAnonfanquake
authored andcommitted
refactor: Move DEFAULT_ANCESTOR_LIMIT to policy/policy.h
1 parent 8e7eeb5 commit da8d304

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/policy/policy.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ static const unsigned int MAX_STANDARD_SCRIPTSIG_SIZE = 1650;
5757
static const unsigned int DUST_RELAY_TX_FEE = 3000;
5858
/** Default for -minrelaytxfee, minimum relay fee for transactions */
5959
static const unsigned int DEFAULT_MIN_RELAY_TX_FEE = 1000;
60+
/** Default for -limitancestorcount, max number of in-mempool ancestors */
61+
static constexpr unsigned int DEFAULT_ANCESTOR_LIMIT{25};
6062
/**
6163
* Standard script verification flags that standard transactions will comply
6264
* with. However scripts violating these flags may still be present in valid

src/validation.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include <node/blockstorage.h>
2222
#include <policy/feerate.h>
2323
#include <policy/packages.h>
24+
#include <policy/policy.h>
2425
#include <script/script_error.h>
2526
#include <sync.h>
2627
#include <txdb.h>
@@ -58,8 +59,6 @@ namespace Consensus {
5859
struct Params;
5960
} // namespace Consensus
6061

61-
/** Default for -limitancestorcount, max number of in-mempool ancestors */
62-
static const unsigned int DEFAULT_ANCESTOR_LIMIT = 25;
6362
/** Default for -limitancestorsize, maximum kilobytes of tx + all in-mempool ancestors */
6463
static const unsigned int DEFAULT_ANCESTOR_SIZE_LIMIT = 101;
6564
/** Default for -limitdescendantcount, max number of in-mempool descendants */

0 commit comments

Comments
 (0)