mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
scripted-diff: Replace NullUniValue with UniValue::VNULL
This is required for removing the UniValue copy constructor. -BEGIN VERIFY SCRIPT- sed -i 's/return NullUniValue/return UniValue::VNULL/g' $(git grep -l NullUniValue ':(exclude)src/univalue') -END VERIFY SCRIPT-
This commit is contained in:
@@ -261,7 +261,7 @@ RPCHelpMan sendtoaddress()
|
||||
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
|
||||
{
|
||||
std::shared_ptr<CWallet> const pwallet = GetWalletForJSONRPCRequest(request);
|
||||
if (!pwallet) return NullUniValue;
|
||||
if (!pwallet) return UniValue::VNULL;
|
||||
|
||||
// Make sure the results are valid at least up to the most recent block
|
||||
// the user could have gotten from another RPC command prior to now
|
||||
@@ -367,7 +367,7 @@ RPCHelpMan sendmany()
|
||||
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
|
||||
{
|
||||
std::shared_ptr<CWallet> const pwallet = GetWalletForJSONRPCRequest(request);
|
||||
if (!pwallet) return NullUniValue;
|
||||
if (!pwallet) return UniValue::VNULL;
|
||||
|
||||
// Make sure the results are valid at least up to the most recent block
|
||||
// the user could have gotten from another RPC command prior to now
|
||||
@@ -422,7 +422,7 @@ RPCHelpMan settxfee()
|
||||
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
|
||||
{
|
||||
std::shared_ptr<CWallet> const pwallet = GetWalletForJSONRPCRequest(request);
|
||||
if (!pwallet) return NullUniValue;
|
||||
if (!pwallet) return UniValue::VNULL;
|
||||
|
||||
LOCK(pwallet->cs_wallet);
|
||||
|
||||
@@ -805,7 +805,7 @@ RPCHelpMan fundrawtransaction()
|
||||
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
|
||||
{
|
||||
std::shared_ptr<CWallet> const pwallet = GetWalletForJSONRPCRequest(request);
|
||||
if (!pwallet) return NullUniValue;
|
||||
if (!pwallet) return UniValue::VNULL;
|
||||
|
||||
RPCTypeCheck(request.params, {UniValue::VSTR, UniValueType(), UniValue::VBOOL});
|
||||
|
||||
@@ -895,7 +895,7 @@ RPCHelpMan signrawtransactionwithwallet()
|
||||
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
|
||||
{
|
||||
const std::shared_ptr<const CWallet> pwallet = GetWalletForJSONRPCRequest(request);
|
||||
if (!pwallet) return NullUniValue;
|
||||
if (!pwallet) return UniValue::VNULL;
|
||||
|
||||
RPCTypeCheck(request.params, {UniValue::VSTR, UniValue::VARR, UniValue::VSTR}, true);
|
||||
|
||||
@@ -992,7 +992,7 @@ static RPCHelpMan bumpfee_helper(std::string method_name)
|
||||
[want_psbt](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
|
||||
{
|
||||
std::shared_ptr<CWallet> const pwallet = GetWalletForJSONRPCRequest(request);
|
||||
if (!pwallet) return NullUniValue;
|
||||
if (!pwallet) return UniValue::VNULL;
|
||||
|
||||
if (pwallet->IsWalletFlagSet(WALLET_FLAG_DISABLE_PRIVATE_KEYS) && !want_psbt) {
|
||||
throw JSONRPCError(RPC_WALLET_ERROR, "bumpfee is not available with wallets that have private keys disabled. Use psbtbumpfee instead.");
|
||||
@@ -1209,7 +1209,7 @@ RPCHelpMan send()
|
||||
);
|
||||
|
||||
std::shared_ptr<CWallet> const pwallet = GetWalletForJSONRPCRequest(request);
|
||||
if (!pwallet) return NullUniValue;
|
||||
if (!pwallet) return UniValue::VNULL;
|
||||
|
||||
UniValue options{request.params[4].isNull() ? UniValue::VOBJ : request.params[4]};
|
||||
InterpretFeeEstimationInstructions(/*conf_target=*/request.params[1], /*estimate_mode=*/request.params[2], /*fee_rate=*/request.params[3], options);
|
||||
@@ -1314,7 +1314,7 @@ RPCHelpMan sendall()
|
||||
);
|
||||
|
||||
std::shared_ptr<CWallet> const pwallet{GetWalletForJSONRPCRequest(request)};
|
||||
if (!pwallet) return NullUniValue;
|
||||
if (!pwallet) return UniValue::VNULL;
|
||||
// Make sure the results are valid at least up to the most recent block
|
||||
// the user could have gotten from another RPC command prior to now
|
||||
pwallet->BlockUntilSyncedToCurrentChain();
|
||||
@@ -1490,7 +1490,7 @@ RPCHelpMan walletprocesspsbt()
|
||||
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
|
||||
{
|
||||
const std::shared_ptr<const CWallet> pwallet = GetWalletForJSONRPCRequest(request);
|
||||
if (!pwallet) return NullUniValue;
|
||||
if (!pwallet) return UniValue::VNULL;
|
||||
|
||||
const CWallet& wallet{*pwallet};
|
||||
// Make sure the results are valid at least up to the most recent block
|
||||
@@ -1617,7 +1617,7 @@ RPCHelpMan walletcreatefundedpsbt()
|
||||
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
|
||||
{
|
||||
std::shared_ptr<CWallet> const pwallet = GetWalletForJSONRPCRequest(request);
|
||||
if (!pwallet) return NullUniValue;
|
||||
if (!pwallet) return UniValue::VNULL;
|
||||
|
||||
CWallet& wallet{*pwallet};
|
||||
// Make sure the results are valid at least up to the most recent block
|
||||
|
||||
Reference in New Issue
Block a user