diff options
author | fanquake <fanquake@gmail.com> | 2023-11-17 10:37:47 +0000 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2023-11-17 10:56:41 +0000 |
commit | 950af7c8767aaaf66fe329cb10deaf0aea8e6ed9 (patch) | |
tree | 3287d25df47bb2e67816726a33cbd71e430b5330 /src/wallet/spend.cpp | |
parent | afd3e99856208d83bccfeb7bfbb0462f665b28e1 (diff) | |
parent | 83986f464c59a6517f790a960a72574e167f3f72 (diff) | |
download | bitcoin-950af7c8767aaaf66fe329cb10deaf0aea8e6ed9.tar.xz |
Merge bitcoin/bitcoin#28878: Remove version field from GetSerializeSize
83986f464c59a6517f790a960a72574e167f3f72 Include version.h in fewer places (Anthony Towns)
c7b61fd61b199cbefda660c9d394bb4035a49528 Convert some CDataStream to DataStream (Anthony Towns)
1410d300df7e57a895f2697d9849a2201021c973 serialize: Drop useless version param from GetSerializeSize() (Anthony Towns)
bf574a75016123309b894da895ab1c7a81731933 serialize: drop GetSerializeSizeMany (Anthony Towns)
efa9eb6d7c8012fe4ed85699d81c8fe5dd18da1e serialize: Drop nVersion from [C]SizeComputer (Anthony Towns)
Pull request description:
Drops the version field from `GetSerializeSize()`, simplifying the code in various places. Also drop `GetSerializeSizeMany()` (as just removing the version parameter could result in silent bugs) and remove unnecessary instances of `#include <version.h>`.
ACKs for top commit:
maflcko:
ACK 83986f464c59a6517f790a960a72574e167f3f72 📒
theuni:
ACK 83986f464c59a6517f790a960a72574e167f3f72.
Tree-SHA512: 36617b6dfbb1b4b0afbf673e905525fc6d623d3f568d3f86e3b9d4f69820db97d099e83a88007bfff881f731ddca6755ebf1549e8d8a7762437dfadbf434c62e
Diffstat (limited to 'src/wallet/spend.cpp')
-rw-r--r-- | src/wallet/spend.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wallet/spend.cpp b/src/wallet/spend.cpp index b573062d32..d586f6d4aa 100644 --- a/src/wallet/spend.cpp +++ b/src/wallet/spend.cpp @@ -1081,7 +1081,7 @@ static util::Result<CreatedTransactionResult> CreateTransactionInternal( CTxOut txout(recipient.nAmount, GetScriptForDestination(recipient.dest)); // Include the fee cost for outputs. - coin_selection_params.tx_noinputs_size += ::GetSerializeSize(txout, PROTOCOL_VERSION); + coin_selection_params.tx_noinputs_size += ::GetSerializeSize(txout); if (IsDust(txout, wallet.chain().relayDustFee())) { return util::Error{_("Transaction amount too small")}; |