aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/rpc
diff options
context:
space:
mode:
authorMarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>2023-11-19 14:58:00 +0100
committerMarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>2023-11-28 12:42:37 +0100
commitfae76a1f2ac0b352cdd708e6d57f8605bf40112e (patch)
tree796b195f7feba774f65c72916d8be501dda54b11 /src/wallet/rpc
parentfac39b56b723f79ba0aa9570708a1d4a600f4e12 (diff)
downloadbitcoin-fae76a1f2ac0b352cdd708e6d57f8605bf40112e.tar.xz
scripted-diff: Use DataStream in most places
The remaining places are handled easier outside a scripted-diff. -BEGIN VERIFY SCRIPT- sed --regexp-extended -i 's/CDataStream ([0-9a-zA-Z_]+)\(SER_[A-Z]+, [A-Z_]+_VERSION\);/DataStream \1{};/g' $( git grep -l CDataStream) sed -i 's/, CDataStream/, DataStream/g' src/wallet/walletdb.cpp -END VERIFY SCRIPT-
Diffstat (limited to 'src/wallet/rpc')
-rw-r--r--src/wallet/rpc/spend.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/wallet/rpc/spend.cpp b/src/wallet/rpc/spend.cpp
index 84e617c140..aa6db11d1c 100644
--- a/src/wallet/rpc/spend.cpp
+++ b/src/wallet/rpc/spend.cpp
@@ -100,7 +100,7 @@ static UniValue FinishTransaction(const std::shared_ptr<CWallet> pwallet, const
bool add_to_wallet{options.exists("add_to_wallet") ? options["add_to_wallet"].get_bool() : true};
if (psbt_opt_in || !complete || !add_to_wallet) {
// Serialize the PSBT
- CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION);
+ DataStream ssTx{};
ssTx << psbtx;
result.pushKV("psbt", EncodeBase64(ssTx.str()));
}
@@ -1165,7 +1165,7 @@ static RPCHelpMan bumpfee_helper(std::string method_name)
const TransactionError err = pwallet->FillPSBT(psbtx, complete, SIGHASH_DEFAULT, /*sign=*/false, /*bip32derivs=*/true);
CHECK_NONFATAL(err == TransactionError::OK);
CHECK_NONFATAL(!complete);
- CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION);
+ DataStream ssTx{};
ssTx << psbtx;
result.pushKV("psbt", EncodeBase64(ssTx.str()));
}
@@ -1610,7 +1610,7 @@ RPCHelpMan walletprocesspsbt()
}
UniValue result(UniValue::VOBJ);
- CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION);
+ DataStream ssTx{};
ssTx << psbtx;
result.pushKV("psbt", EncodeBase64(ssTx.str()));
result.pushKV("complete", complete);
@@ -1737,7 +1737,7 @@ RPCHelpMan walletcreatefundedpsbt()
}
// Serialize the PSBT
- CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION);
+ DataStream ssTx{};
ssTx << psbtx;
UniValue result(UniValue::VOBJ);