mirror of
https://github.com/dashpay/dash.git
synced 2024-12-29 13:59:06 +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))
|
else if (nTotalCache > (nMaxDbCache << 20))
|
||||||
nTotalCache = (nMaxDbCache << 20); // total cache cannot be greater than nMaxDbCache
|
nTotalCache = (nMaxDbCache << 20); // total cache cannot be greater than nMaxDbCache
|
||||||
size_t nBlockTreeDBCache = nTotalCache / 8;
|
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
|
nBlockTreeDBCache = (1 << 21); // block tree db cache shouldn't be larger than 2 MiB
|
||||||
nTotalCache -= nBlockTreeDBCache;
|
nTotalCache -= nBlockTreeDBCache;
|
||||||
size_t nCoinDBCache = nTotalCache / 2; // use half of the remaining cache for coindb cache
|
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
|
// 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");
|
strLoadError = _("You need to rebuild the database using -reindex to change -txindex");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -58,7 +58,7 @@ CConditionVariable cvBlockChange;
|
|||||||
int nScriptCheckThreads = 0;
|
int nScriptCheckThreads = 0;
|
||||||
bool fImporting = false;
|
bool fImporting = false;
|
||||||
bool fReindex = false;
|
bool fReindex = false;
|
||||||
bool fTxIndex = false;
|
bool fTxIndex = true;
|
||||||
bool fIsBareMultisigStd = true;
|
bool fIsBareMultisigStd = true;
|
||||||
bool fCheckBlockIndex = false;
|
bool fCheckBlockIndex = false;
|
||||||
unsigned int nCoinCacheSize = 5000;
|
unsigned int nCoinCacheSize = 5000;
|
||||||
@ -3597,7 +3597,7 @@ bool InitBlockIndex() {
|
|||||||
return true;
|
return true;
|
||||||
|
|
||||||
// Use the provided setting for -txindex in the new database
|
// Use the provided setting for -txindex in the new database
|
||||||
fTxIndex = GetBoolArg("-txindex", false);
|
fTxIndex = GetBoolArg("-txindex", true);
|
||||||
pblocktree->WriteFlag("txindex", fTxIndex);
|
pblocktree->WriteFlag("txindex", fTxIndex);
|
||||||
LogPrintf("Initializing databases...\n");
|
LogPrintf("Initializing databases...\n");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user