diff --git a/src/chainparams.cpp b/src/chainparams.cpp index bbd1c9f1b2..872267b8c1 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -842,7 +842,7 @@ protected: // Determines type of genesis block consensus.genesis_style = args.GetArg("-con_genesis_style", "elements"); - // Block signing encumberance script, default of 51 aka OP_TRUE + // Block signing encumbrance script, default of 51 aka OP_TRUE std::vector sign_bytes = ParseHex(args.GetArg("-signblockscript", default_signblockscript)); consensus.signblockscript = CScript(sign_bytes.begin(), sign_bytes.end()); consensus.max_block_signature_size = args.GetIntArg("-con_max_block_sig_size", consensus.max_block_signature_size); diff --git a/src/wallet/rpc/elements.cpp b/src/wallet/rpc/elements.cpp index 296d8b8561..3bfa4253a2 100644 --- a/src/wallet/rpc/elements.cpp +++ b/src/wallet/rpc/elements.cpp @@ -174,6 +174,10 @@ RPCHelpMan getpeginaddress() if (!wallet) return NullUniValue; CWallet* const pwallet = wallet.get(); + if (pwallet->chain().isInitialBlockDownload()) { + throw JSONRPCError(RPC_WALLET_ERROR, "This action cannot be completed during initial sync or reindexing."); + } + LegacyScriptPubKeyMan* spk_man = pwallet->GetLegacyScriptPubKeyMan(); if (!spk_man) { throw JSONRPCError(RPC_WALLET_ERROR, "This type of wallet does not support this command"); @@ -361,18 +365,11 @@ RPCHelpMan initpegoutwallet() } // Three acceptable descriptors: - bool is_liquid = Params().NetworkIDString() == "liquidv1"; if (bitcoin_desc.substr(0, 8) == "sh(wpkh(" && bitcoin_desc.substr(bitcoin_desc.size()-2, 2) == "))") { - if(is_liquid) { - throw JSONRPCError(RPC_INVALID_PARAMETER, "bitcoin_descriptor is not supported by Liquid; try pkh() or ."); - } xpub_str = bitcoin_desc.substr(8, bitcoin_desc.size()-2); } else if (bitcoin_desc.substr(0, 5) == "wpkh(" && bitcoin_desc.substr(bitcoin_desc.size()-1, 1) == ")") { - if(is_liquid) { - throw JSONRPCError(RPC_INVALID_PARAMETER, "bitcoin_descriptor is not supported by Liquid; try pkh() or ."); - } xpub_str = bitcoin_desc.substr(5, bitcoin_desc.size()-1); } else if (bitcoin_desc.substr(0, 4) == "pkh(" && bitcoin_desc.substr(bitcoin_desc.size()-1, 1) == ")") {