Fix import-rescan.py and add workaround for pruning mode
Added a workaround to the masternode+pruning mode check to allow pruning in regtest. The actual bug behind the masternode+pruning check is not touched this way. Please read the linked GitHub issues for details.
This commit is contained in:
parent
1ba1256217
commit
d56ac5a747
@ -112,7 +112,8 @@ class ImportRescanTest(BitcoinTestFramework):
|
||||
extra_args = [["-debug=1"] for _ in range(self.num_nodes)]
|
||||
for i, import_node in enumerate(IMPORT_NODES, 1):
|
||||
if import_node.prune:
|
||||
extra_args[i] += ["-prune=1"]
|
||||
# txindex is enabled by default in Dash and needs to be disabled for import-rescan.py
|
||||
extra_args[i] += ["-prune=1", "-txindex=0", "-reindex-chainstate"]
|
||||
|
||||
self.nodes = start_nodes(self.num_nodes, self.options.tmpdir, extra_args)
|
||||
for i in range(1, self.num_nodes):
|
||||
|
@ -1745,7 +1745,8 @@ bool AppInitMain(boost::thread_group& threadGroup, CScheduler& scheduler)
|
||||
fMasternodeMode = GetBoolArg("-masternode", false);
|
||||
// TODO: masternode should have no wallet
|
||||
|
||||
if((fMasternodeMode || masternodeConfig.getCount() > -1) && fTxIndex == false) {
|
||||
if((fMasternodeMode || masternodeConfig.getCount() > -1) && fTxIndex == false
|
||||
&& chainparams.NetworkIDString() != CBaseChainParams::REGTEST) { // TODO remove this when pruning is fixed. See https://github.com/dashpay/dash/pull/1817 and https://github.com/dashpay/dash/pull/1743
|
||||
return InitError("Enabling Masternode support requires turning on transaction indexing."
|
||||
"Please add txindex=1 to your configuration and start with -reindex");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user