diff --git a/qa/rpc-tests/import-rescan.py b/qa/rpc-tests/import-rescan.py index 4a86c670b..a04c3df61 100755 --- a/qa/rpc-tests/import-rescan.py +++ b/qa/rpc-tests/import-rescan.py @@ -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): diff --git a/src/init.cpp b/src/init.cpp index 67cf81ff3..5522d93d3 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -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"); }