Implement roll-back limit for reorganisation

Closes #713.
This commit is contained in:
Jack Grigg
2017-06-21 23:53:01 +12:00
parent e6850571dd
commit 57e6ecda5a
6 changed files with 120 additions and 2 deletions

View File

@@ -8,9 +8,9 @@
#include "amount.h"
#include "coins.h"
#include "consensus/consensus.h"
#include "key.h"
#include "keystore.h"
#include "main.h"
#include "primitives/block.h"
#include "primitives/transaction.h"
#include "tinyformat.h"
@@ -58,7 +58,7 @@ static const unsigned int MAX_FREE_TRANSACTION_CREATE_SIZE = 1000;
//! Size of witness cache
// Should be large enough that we can expect not to reorg beyond our cache
// unless there is some exceptional network disruption.
static const unsigned int WITNESS_CACHE_SIZE = COINBASE_MATURITY;
static const unsigned int WITNESS_CACHE_SIZE = MAX_REORG_LENGTH + 1;
class CBlockIndex;
class CCoinControl;