aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/rpcwallet.cpp
diff options
context:
space:
mode:
authorGregory Sanders <gsanders87@gmail.com>2021-10-05 21:17:22 +0800
committerGregory Sanders <gsanders87@gmail.com>2021-10-06 06:55:34 +0800
commit43568782c23185a0599a6e60d61db4716da1cda1 (patch)
tree04deda211ec05b5b160aaf1169a4fcfd0a147830 /src/wallet/rpcwallet.cpp
parentc79d9fb2f6e5f47dcb0ac45d66a542dad0c8e7e4 (diff)
downloadbitcoin-43568782c23185a0599a6e60d61db4716da1cda1.tar.xz
External input fund support cleanups
Synchronize error checking for external inputs Rename external output Select to SelectExternal Const FundTransaction variables
Diffstat (limited to 'src/wallet/rpcwallet.cpp')
-rw-r--r--src/wallet/rpcwallet.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp
index 39cde4e4ec..7edf286ac0 100644
--- a/src/wallet/rpcwallet.cpp
+++ b/src/wallet/rpcwallet.cpp
@@ -3292,7 +3292,7 @@ void FundTransaction(CWallet& wallet, CMutableTransaction& tx, CAmount& fee_out,
}
if (options.exists("solving_data")) {
- UniValue solving_data = options["solving_data"].get_obj();
+ const UniValue solving_data = options["solving_data"].get_obj();
if (solving_data.exists("pubkeys")) {
for (const UniValue& pk_univ : solving_data["pubkeys"].get_array().getValues()) {
const std::string& pk_str = pk_univ.get_str();
@@ -3300,7 +3300,7 @@ void FundTransaction(CWallet& wallet, CMutableTransaction& tx, CAmount& fee_out,
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, strprintf("'%s' is not hex", pk_str));
}
const std::vector<unsigned char> data(ParseHex(pk_str));
- CPubKey pubkey(data.begin(), data.end());
+ const CPubKey pubkey(data.begin(), data.end());
if (!pubkey.IsFullyValid()) {
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, strprintf("'%s' is not a valid public key", pk_str));
}
@@ -3365,7 +3365,7 @@ void FundTransaction(CWallet& wallet, CMutableTransaction& tx, CAmount& fee_out,
wallet.chain().findCoins(coins);
for (const auto& coin : coins) {
if (!coin.second.out.IsNull()) {
- coinControl.Select(coin.first, coin.second.out);
+ coinControl.SelectExternal(coin.first, coin.second.out);
}
}