Merge pull request #5737 from steven-ecc/5705-remove-orchard-experimental-flag
Remove the fExperimentalOrchardWallet flag and related logic
This commit is contained in:
commit
e87b94d88d
|
@ -30,8 +30,6 @@ class ShieldCoinbaseTest (BitcoinTestFramework):
|
|||
|
||||
def start_node_with(self, index, extra_args=[]):
|
||||
args = [
|
||||
'-experimentalfeatures',
|
||||
'-orchardwallet',
|
||||
nuparams(BLOSSOM_BRANCH_ID, 1),
|
||||
nuparams(HEARTWOOD_BRANCH_ID, 10),
|
||||
nuparams(CANOPY_BRANCH_ID, 20),
|
||||
|
|
|
@ -37,9 +37,6 @@ class OrchardReorgTest(BitcoinTestFramework):
|
|||
nuparams(CANOPY_BRANCH_ID, 5),
|
||||
nuparams(NU5_BRANCH_ID, 10),
|
||||
'-nurejectoldversions=false',
|
||||
'-experimentalfeatures',
|
||||
'-orchardwallet',
|
||||
# '-debug',
|
||||
]] * self.num_nodes)
|
||||
|
||||
def run_test(self):
|
||||
|
|
|
@ -23,8 +23,6 @@ from decimal import Decimal
|
|||
class WalletAccountsTest(BitcoinTestFramework):
|
||||
def setup_nodes(self):
|
||||
return start_nodes(self.num_nodes, self.options.tmpdir, [[
|
||||
'-experimentalfeatures',
|
||||
'-orchardwallet',
|
||||
nuparams(NU5_BRANCH_ID, 210),
|
||||
]] * self.num_nodes)
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ class WalletAddressesTest(BitcoinTestFramework):
|
|||
def setup_network(self):
|
||||
self.nodes = start_nodes(
|
||||
self.num_nodes, self.options.tmpdir,
|
||||
extra_args=[['-experimentalfeatures', '-orchardwallet', nuparams(NU5_BRANCH_ID, 2),]] * self.num_nodes)
|
||||
extra_args=[[nuparams(NU5_BRANCH_ID, 2),]] * self.num_nodes)
|
||||
connect_nodes_bi(self.nodes, 0, 1)
|
||||
self.is_network_split = False
|
||||
self.sync_all()
|
||||
|
|
|
@ -36,8 +36,6 @@ class ListReceivedTest (BitcoinTestFramework):
|
|||
self.nodes = start_nodes(
|
||||
self.num_nodes, self.options.tmpdir,
|
||||
extra_args=[[
|
||||
'-experimentalfeatures',
|
||||
'-orchardwallet',
|
||||
nuparams(NU5_BRANCH_ID, 225),
|
||||
]] * self.num_nodes
|
||||
)
|
||||
|
|
|
@ -23,8 +23,6 @@ class WalletOrchardTest(BitcoinTestFramework):
|
|||
|
||||
def setup_nodes(self):
|
||||
return start_nodes(self.num_nodes, self.options.tmpdir, [[
|
||||
'-experimentalfeatures',
|
||||
'-orchardwallet',
|
||||
nuparams(NU5_BRANCH_ID, 210),
|
||||
]] * self.num_nodes)
|
||||
|
||||
|
|
|
@ -21,8 +21,6 @@ class WalletShieldCoinbaseTest (BitcoinTestFramework):
|
|||
args = [
|
||||
'-regtestprotectcoinbase',
|
||||
'-debug=zrpcunsafe',
|
||||
'-experimentalfeatures',
|
||||
'-orchardwallet',
|
||||
nuparams(NU5_BRANCH_ID, self.nu5_activation),
|
||||
]
|
||||
self.nodes = []
|
||||
|
|
|
@ -21,8 +21,6 @@ from decimal import Decimal
|
|||
class WalletZSendmanyTest(BitcoinTestFramework):
|
||||
def setup_network(self, split=False):
|
||||
self.nodes = start_nodes(3, self.options.tmpdir, [[
|
||||
'-experimentalfeatures',
|
||||
'-orchardwallet',
|
||||
]] * self.num_nodes)
|
||||
connect_nodes_bi(self.nodes,0,1)
|
||||
connect_nodes_bi(self.nodes,1,2)
|
||||
|
|
|
@ -11,7 +11,6 @@ bool fExperimentalDeveloperSetPoolSizeZero = false;
|
|||
bool fExperimentalPaymentDisclosure = false;
|
||||
bool fExperimentalInsightExplorer = false;
|
||||
bool fExperimentalLightWalletd = false;
|
||||
bool fExperimentalOrchardWallet = false;
|
||||
|
||||
std::optional<std::string> InitExperimentalMode()
|
||||
{
|
||||
|
@ -21,7 +20,6 @@ std::optional<std::string> InitExperimentalMode()
|
|||
fExperimentalPaymentDisclosure = GetBoolArg("-paymentdisclosure", false);
|
||||
fExperimentalInsightExplorer = GetBoolArg("-insightexplorer", false);
|
||||
fExperimentalLightWalletd = GetBoolArg("-lightwalletd", false);
|
||||
fExperimentalOrchardWallet = GetBoolArg("-orchardwallet", false);
|
||||
|
||||
// Fail if user has set experimental options without the global flag
|
||||
if (!fExperimentalMode) {
|
||||
|
@ -35,8 +33,6 @@ std::optional<std::string> InitExperimentalMode()
|
|||
return _("Insight explorer requires -experimentalfeatures.");
|
||||
} else if (fExperimentalLightWalletd) {
|
||||
return _("Light Walletd requires -experimentalfeatures.");
|
||||
} else if (fExperimentalOrchardWallet) {
|
||||
return _("Orchard-enabled wallet requires -experimentalfeatures.");
|
||||
}
|
||||
}
|
||||
return std::nullopt;
|
||||
|
@ -55,8 +51,6 @@ std::vector<std::string> GetExperimentalFeatures()
|
|||
experimentalfeatures.push_back("insightexplorer");
|
||||
if (fExperimentalLightWalletd)
|
||||
experimentalfeatures.push_back("lightwalletd");
|
||||
if (fExperimentalOrchardWallet)
|
||||
experimentalfeatures.push_back("orchardwallet");
|
||||
|
||||
return experimentalfeatures;
|
||||
}
|
||||
|
|
|
@ -14,7 +14,6 @@ extern bool fExperimentalDeveloperSetPoolSizeZero;
|
|||
extern bool fExperimentalPaymentDisclosure;
|
||||
extern bool fExperimentalInsightExplorer;
|
||||
extern bool fExperimentalLightWalletd;
|
||||
extern bool fExperimentalOrchardWallet;
|
||||
|
||||
std::optional<std::string> InitExperimentalMode();
|
||||
std::vector<std::string> GetExperimentalFeatures();
|
||||
|
|
|
@ -947,12 +947,6 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
|
|||
return InitError(err.value());
|
||||
}
|
||||
|
||||
// Just temporarily (until fully functional), don't allow the Orchard wallet
|
||||
// extensions if we're on mainnet
|
||||
if (fExperimentalOrchardWallet && chainparams.NetworkIDString() == "main") {
|
||||
return InitError(_("The -orchardwallet setting is not yet available on mainnet."));
|
||||
}
|
||||
|
||||
// if using block pruning, then disable txindex
|
||||
if (GetArg("-prune", 0)) {
|
||||
if (GetBoolArg("-txindex", DEFAULT_TXINDEX))
|
||||
|
|
|
@ -3235,10 +3235,6 @@ UniValue z_getnewaccount(const UniValue& params, bool fHelp)
|
|||
+ HelpExampleRpc("z_getnewaccount", "")
|
||||
);
|
||||
|
||||
if (!fExperimentalOrchardWallet) {
|
||||
throw JSONRPCError(RPC_WALLET_ENCRYPTION_FAILED, "Error: the Orchard wallet experimental extensions are disabled.");
|
||||
}
|
||||
|
||||
LOCK(pwalletMain->cs_wallet);
|
||||
|
||||
EnsureWalletIsUnlocked();
|
||||
|
@ -3285,10 +3281,6 @@ UniValue z_getaddressforaccount(const UniValue& params, bool fHelp)
|
|||
+ HelpExampleRpc("z_getaddressforaccount", "4")
|
||||
);
|
||||
|
||||
if (!fExperimentalOrchardWallet) {
|
||||
throw JSONRPCError(RPC_WALLET_ENCRYPTION_FAILED, "Error: the Orchard wallet experimental extensions are disabled.");
|
||||
}
|
||||
|
||||
// cs_main is required for obtaining the current height, for
|
||||
// CWallet::DefaultReceiverTypes
|
||||
LOCK2(cs_main, pwalletMain->cs_wallet);
|
||||
|
@ -3508,10 +3500,6 @@ UniValue z_listunifiedreceivers(const UniValue& params, bool fHelp)
|
|||
+ HelpExampleRpc("z_listunifiedreceivers", "")
|
||||
);
|
||||
|
||||
if (!fExperimentalOrchardWallet) {
|
||||
throw JSONRPCError(RPC_WALLET_ENCRYPTION_FAILED, "Error: the Orchard wallet experimental extensions are disabled.");
|
||||
}
|
||||
|
||||
KeyIO keyIO(Params());
|
||||
auto decoded = keyIO.DecodePaymentAddress(params[0].get_str());
|
||||
if (!decoded.has_value()) {
|
||||
|
@ -3963,10 +3951,6 @@ UniValue z_getbalanceforviewingkey(const UniValue& params, bool fHelp)
|
|||
+ HelpExampleRpc("z_getbalanceforviewingkey", "\"myfvk\", 5")
|
||||
);
|
||||
|
||||
if (!fExperimentalOrchardWallet) {
|
||||
throw JSONRPCError(RPC_WALLET_ENCRYPTION_FAILED, "Error: the Orchard wallet experimental extensions are disabled.");
|
||||
}
|
||||
|
||||
KeyIO keyIO(Params());
|
||||
auto decoded = keyIO.DecodeViewingKey(params[0].get_str());
|
||||
if (!decoded.has_value()) {
|
||||
|
@ -4074,10 +4058,6 @@ UniValue z_getbalanceforaccount(const UniValue& params, bool fHelp)
|
|||
+ HelpExampleRpc("z_getbalanceforaccount", "4 5")
|
||||
);
|
||||
|
||||
if (!fExperimentalOrchardWallet) {
|
||||
throw JSONRPCError(RPC_WALLET_ENCRYPTION_FAILED, "Error: the Orchard wallet experimental extensions are disabled.");
|
||||
}
|
||||
|
||||
int64_t accountInt = params[0].get_int64();
|
||||
if (accountInt < 0 || accountInt >= ZCASH_LEGACY_ACCOUNT) {
|
||||
throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid account number, must be 0 <= account <= (2^31)-2.");
|
||||
|
|
Loading…
Reference in New Issue