diff --git a/qa/rpc-tests/mergetoaddress_helper.py b/qa/rpc-tests/mergetoaddress_helper.py index 653a2882f..e76d6a562 100755 --- a/qa/rpc-tests/mergetoaddress_helper.py +++ b/qa/rpc-tests/mergetoaddress_helper.py @@ -41,12 +41,12 @@ class MergeToAddressHelper: initialize_chain_clean(test.options.tmpdir, 4) def setup_network(self, test, additional_args=[]): - args = ['-debug=zrpcunsafe', '-experimentalfeatures', '-zmergetoaddress'] + args = ['-debug=zrpcunsafe'] args += additional_args test.nodes = [] test.nodes.append(start_node(0, test.options.tmpdir, args)) test.nodes.append(start_node(1, test.options.tmpdir, args)) - args2 = ['-debug=zrpcunsafe', '-experimentalfeatures', '-zmergetoaddress', '-mempooltxinputlimit=7'] + args2 = ['-debug=zrpcunsafe', '-mempooltxinputlimit=7'] args2 += additional_args test.nodes.append(start_node(2, test.options.tmpdir, args2)) connect_nodes_bi(test.nodes, 0, 1) diff --git a/qa/rpc-tests/mergetoaddress_mixednotes.py b/qa/rpc-tests/mergetoaddress_mixednotes.py index be78d1444..7c2cc4e40 100755 --- a/qa/rpc-tests/mergetoaddress_mixednotes.py +++ b/qa/rpc-tests/mergetoaddress_mixednotes.py @@ -14,9 +14,7 @@ from mergetoaddress_helper import assert_mergetoaddress_exception class MergeToAddressMixedNotes(BitcoinTestFramework): def setup_nodes(self): - return start_nodes(4, self.options.tmpdir, [[ - '-experimentalfeatures', '-zmergetoaddress' - ]] * 4) + return start_nodes(4, self.options.tmpdir) def setup_chain(self): print("Initializing test directory " + self.options.tmpdir) diff --git a/qa/rpc-tests/wallet_changeaddresses.py b/qa/rpc-tests/wallet_changeaddresses.py index ceb8b0094..379a2a3bd 100755 --- a/qa/rpc-tests/wallet_changeaddresses.py +++ b/qa/rpc-tests/wallet_changeaddresses.py @@ -27,8 +27,7 @@ class WalletChangeAddressesTest(BitcoinTestFramework): args = [ '-nuparams=5ba81b19:1', # Overwinter '-nuparams=76b809bb:1', # Sapling - '-txindex', # Avoid JSONRPC error: No information available about transaction - '-experimentalfeatures', '-zmergetoaddress', + '-txindex' # Avoid JSONRPC error: No information available about transaction ] self.nodes = [] self.nodes.append(start_node(0, self.options.tmpdir, args)) diff --git a/qa/rpc-tests/wallet_sapling.py b/qa/rpc-tests/wallet_sapling.py index ca42893dd..b9bfa1f57 100755 --- a/qa/rpc-tests/wallet_sapling.py +++ b/qa/rpc-tests/wallet_sapling.py @@ -20,9 +20,7 @@ from decimal import Decimal class WalletSaplingTest(BitcoinTestFramework): def setup_nodes(self): - return start_nodes(4, self.options.tmpdir, [[ - '-experimentalfeatures', '-zmergetoaddress', - ]] * 4) + return start_nodes(4, self.options.tmpdir) def run_test(self): # Sanity-check the test harness diff --git a/src/init.cpp b/src/init.cpp index f583c7602..4b1787358 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -848,8 +848,6 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) return InitError(_("Setting the size of shielded pools to zero requires -experimentalfeatures.")); } else if (mapArgs.count("-paymentdisclosure")) { return InitError(_("Payment disclosure requires -experimentalfeatures.")); - } else if (mapArgs.count("-zmergetoaddress")) { - return InitError(_("RPC method z_mergetoaddress requires -experimentalfeatures.")); } else if (mapArgs.count("-insightexplorer")) { return InitError(_("Insight explorer requires -experimentalfeatures.")); } diff --git a/src/test/rpc_wallet_tests.cpp b/src/test/rpc_wallet_tests.cpp index 1da844bdf..7920dba2a 100644 --- a/src/test/rpc_wallet_tests.cpp +++ b/src/test/rpc_wallet_tests.cpp @@ -1686,13 +1686,6 @@ BOOST_AUTO_TEST_CASE(rpc_z_mergetoaddress_parameters) LOCK(pwalletMain->cs_wallet); - CheckRPCThrows("z_mergetoaddress 1 2", - "Error: z_mergetoaddress is disabled. Run './zcash-cli help z_mergetoaddress' for instructions on how to enable this feature."); - - // Set global state required for z_mergetoaddress - fExperimentalMode = true; - mapArgs["-zmergetoaddress"] = "1"; - BOOST_CHECK_THROW(CallRPC("z_mergetoaddress"), runtime_error); BOOST_CHECK_THROW(CallRPC("z_mergetoaddress toofewargs"), runtime_error); BOOST_CHECK_THROW(CallRPC("z_mergetoaddress just too many args present for this method"), runtime_error); @@ -1830,10 +1823,6 @@ BOOST_AUTO_TEST_CASE(rpc_z_mergetoaddress_parameters) } catch (const UniValue& objError) { BOOST_CHECK( find_error(objError, "Invalid recipient address")); } - - // Un-set global state - fExperimentalMode = false; - mapArgs.erase("-zmergetoaddress"); } diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 01efa1640..b6013643f 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -4262,17 +4262,9 @@ UniValue z_mergetoaddress(const UniValue& params, bool fHelp) if (!EnsureWalletIsAvailable(fHelp)) return NullUniValue; - string enableArg = "zmergetoaddress"; - auto fEnableMergeToAddress = fExperimentalMode && GetBoolArg("-" + enableArg, false); - std::string strDisabledMsg = ""; - if (!fEnableMergeToAddress) { - strDisabledMsg = experimentalDisabledHelpMsg("z_mergetoaddress", enableArg); - } - if (fHelp || params.size() < 2 || params.size() > 6) throw runtime_error( "z_mergetoaddress [\"fromaddress\", ... ] \"toaddress\" ( fee ) ( transparent_limit ) ( shielded_limit ) ( memo )\n" - + strDisabledMsg + "\nMerge multiple UTXOs and notes into a single UTXO or note. Coinbase UTXOs are ignored; use `z_shieldcoinbase`" "\nto combine those into a single note." "\n\nThis is an asynchronous operation, and UTXOs selected for merging will be locked. If there is an error, they" @@ -4323,10 +4315,6 @@ UniValue z_mergetoaddress(const UniValue& params, bool fHelp) + HelpExampleRpc("z_mergetoaddress", "[\"ANY_SAPLING\", \"t1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd\"], \"ztestsapling19rnyu293v44f0kvtmszhx35lpdug574twc0lwyf4s7w0umtkrdq5nfcauxrxcyfmh3m7slemqsj\"") ); - if (!fEnableMergeToAddress) { - throw JSONRPCError(RPC_WALLET_ERROR, "Error: z_mergetoaddress is disabled. Run './zcash-cli help z_mergetoaddress' for instructions on how to enable this feature."); - } - LOCK2(cs_main, pwalletMain->cs_wallet); bool useAnyUTXO = false;