diff options
author | MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> | 2023-11-19 14:58:00 +0100 |
---|---|---|
committer | MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> | 2023-11-28 12:42:37 +0100 |
commit | fae76a1f2ac0b352cdd708e6d57f8605bf40112e (patch) | |
tree | 796b195f7feba774f65c72916d8be501dda54b11 /src/rpc | |
parent | fac39b56b723f79ba0aa9570708a1d4a600f4e12 (diff) | |
download | bitcoin-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/rpc')
-rw-r--r-- | src/rpc/rawtransaction.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp index e8bcbd8a2b..56ef8a5efc 100644 --- a/src/rpc/rawtransaction.cpp +++ b/src/rpc/rawtransaction.cpp @@ -1493,7 +1493,7 @@ static RPCHelpMan combinepsbt() throw JSONRPCTransactionError(error); } - CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION); + DataStream ssTx{}; ssTx << merged_psbt; return EncodeBase64(ssTx); }, @@ -1538,7 +1538,7 @@ static RPCHelpMan finalizepsbt() bool complete = FinalizeAndExtractPSBT(psbtx, mtx); UniValue result(UniValue::VOBJ); - CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION); + DataStream ssTx{}; std::string result_str; if (complete && extract) { @@ -1589,7 +1589,7 @@ static RPCHelpMan createpsbt() } // Serialize the PSBT - CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION); + DataStream ssTx{}; ssTx << psbtx; return EncodeBase64(ssTx); @@ -1656,7 +1656,7 @@ static RPCHelpMan converttopsbt() } // Serialize the PSBT - CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION); + DataStream ssTx{}; ssTx << psbtx; return EncodeBase64(ssTx); @@ -1703,7 +1703,7 @@ static RPCHelpMan utxoupdatepsbt() /*sighash_type=*/SIGHASH_ALL, /*finalize=*/false); - CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION); + DataStream ssTx{}; ssTx << psbtx; return EncodeBase64(ssTx); }, @@ -1804,7 +1804,7 @@ static RPCHelpMan joinpsbts() } shuffled_psbt.unknown.insert(merged_psbt.unknown.begin(), merged_psbt.unknown.end()); - CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION); + DataStream ssTx{}; ssTx << shuffled_psbt; return EncodeBase64(ssTx); }, @@ -1984,7 +1984,7 @@ RPCHelpMan descriptorprocesspsbt() complete &= PSBTInputSigned(input); } - CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION); + DataStream ssTx{}; ssTx << psbtx; UniValue result(UniValue::VOBJ); |