Browse Source

Set witness cache size equal to coinbase maturity duration

Both constants have the same implicit assumption: that the blockchain will very
rarely undergo a reorganisation of that size.
pull/145/head
Jack Grigg 8 years ago
parent
commit
38a6e7a74d
  1. 1
      src/wallet/wallet.cpp
  2. 3
      src/wallet/wallet.h

1
src/wallet/wallet.cpp

@ -8,7 +8,6 @@
#include "base58.h"
#include "checkpoints.h"
#include "coincontrol.h"
#include "consensus/consensus.h"
#include "consensus/validation.h"
#include "init.h"
#include "main.h"

3
src/wallet/wallet.h

@ -8,6 +8,7 @@
#include "amount.h"
#include "coins.h"
#include "consensus/consensus.h"
#include "key.h"
#include "keystore.h"
#include "primitives/block.h"
@ -55,7 +56,7 @@ static const CAmount nHighTransactionMaxFeeWarning = 100 * nHighTransactionFeeWa
static const unsigned int MAX_FREE_TRANSACTION_CREATE_SIZE = 1000;
//! Size of witness cache
// Should be large enough that we can expect to never reorg beyond our cache.
static const unsigned int WITNESS_CACHE_SIZE = 50;
static const unsigned int WITNESS_CACHE_SIZE = COINBASE_MATURITY;
class CAccountingEntry;
class CBlockIndex;

Loading…
Cancel
Save