mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-20 13:37:28 +02:00
Merge pull request #5852
51598b2 Reinitialize state in between individual unit tests. (Pieter Wuille)
This commit is contained in:
commit
cdae53e456
14 changed files with 124 additions and 61 deletions
24
src/main.cpp
24
src/main.cpp
|
|
@ -54,7 +54,6 @@ bool fTxIndex = false;
|
|||
bool fIsBareMultisigStd = true;
|
||||
unsigned int nCoinCacheSize = 5000;
|
||||
|
||||
|
||||
/** Fees smaller than this (in satoshi) are considered zero fee (for relaying and mining) */
|
||||
CFeeRate minRelayTxFee = CFeeRate(1000);
|
||||
|
||||
|
|
@ -3085,10 +3084,31 @@ bool CVerifyDB::VerifyDB(CCoinsView *coinsview, int nCheckLevel, int nCheckDepth
|
|||
|
||||
void UnloadBlockIndex()
|
||||
{
|
||||
mapBlockIndex.clear();
|
||||
LOCK(cs_main);
|
||||
setBlockIndexCandidates.clear();
|
||||
chainActive.SetTip(NULL);
|
||||
pindexBestInvalid = NULL;
|
||||
pindexBestHeader = NULL;
|
||||
mempool.clear();
|
||||
mapOrphanTransactions.clear();
|
||||
mapOrphanTransactionsByPrev.clear();
|
||||
nSyncStarted = 0;
|
||||
mapBlocksUnlinked.clear();
|
||||
vinfoBlockFile.clear();
|
||||
nLastBlockFile = 0;
|
||||
nBlockSequenceId = 1;
|
||||
mapBlockSource.clear();
|
||||
mapBlocksInFlight.clear();
|
||||
nQueuedValidatedHeaders = 0;
|
||||
nPreferredDownload = 0;
|
||||
setDirtyBlockIndex.clear();
|
||||
setDirtyFileInfo.clear();
|
||||
mapNodeState.clear();
|
||||
|
||||
BOOST_FOREACH(BlockMap::value_type& entry, mapBlockIndex) {
|
||||
delete entry.second;
|
||||
}
|
||||
mapBlockIndex.clear();
|
||||
}
|
||||
|
||||
bool LoadBlockIndex()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue