mirror of
https://github.com/dashpay/dash.git
synced 2024-12-28 21:42:47 +01:00
Default txindex to true
This commit is contained in:
parent
3c8b335594
commit
fc54241441
@ -1144,7 +1144,7 @@ bool AppInit2(boost::thread_group& threadGroup)
|
||||
else if (nTotalCache > (nMaxDbCache << 20))
|
||||
nTotalCache = (nMaxDbCache << 20); // total cache cannot be greater than nMaxDbCache
|
||||
size_t nBlockTreeDBCache = nTotalCache / 8;
|
||||
if (nBlockTreeDBCache > (1 << 21) && !GetBoolArg("-txindex", false))
|
||||
if (nBlockTreeDBCache > (1 << 21) && !GetBoolArg("-txindex", true))
|
||||
nBlockTreeDBCache = (1 << 21); // block tree db cache shouldn't be larger than 2 MiB
|
||||
nTotalCache -= nBlockTreeDBCache;
|
||||
size_t nCoinDBCache = nTotalCache / 2; // use half of the remaining cache for coindb cache
|
||||
@ -1192,7 +1192,7 @@ bool AppInit2(boost::thread_group& threadGroup)
|
||||
}
|
||||
|
||||
// Check for changed -txindex state
|
||||
if (fTxIndex != GetBoolArg("-txindex", false)) {
|
||||
if (fTxIndex != GetBoolArg("-txindex", true)) {
|
||||
strLoadError = _("You need to rebuild the database using -reindex to change -txindex");
|
||||
break;
|
||||
}
|
||||
|
@ -58,7 +58,7 @@ CConditionVariable cvBlockChange;
|
||||
int nScriptCheckThreads = 0;
|
||||
bool fImporting = false;
|
||||
bool fReindex = false;
|
||||
bool fTxIndex = false;
|
||||
bool fTxIndex = true;
|
||||
bool fIsBareMultisigStd = true;
|
||||
bool fCheckBlockIndex = false;
|
||||
unsigned int nCoinCacheSize = 5000;
|
||||
@ -3597,7 +3597,7 @@ bool InitBlockIndex() {
|
||||
return true;
|
||||
|
||||
// Use the provided setting for -txindex in the new database
|
||||
fTxIndex = GetBoolArg("-txindex", false);
|
||||
fTxIndex = GetBoolArg("-txindex", true);
|
||||
pblocktree->WriteFlag("txindex", fTxIndex);
|
||||
LogPrintf("Initializing databases...\n");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user