aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Chow <achow101-github@achow101.com>2022-06-29 11:44:23 -0400
committerAndrew Chow <achow101-github@achow101.com>2022-06-29 11:48:19 -0400
commit749b80b29e875cc6afa1c2674cccdfd7115cc16a (patch)
tree2a6c5e67feb56faafd6b73314f59923aa91e8548 /src
parentcc22bd7f708fc3f5e793bf0138cd340f71c0feb9 (diff)
parent25e4762ae7a09906020e62cd947e9f71300439cf (diff)
downloadbitcoin-749b80b29e875cc6afa1c2674cccdfd7115cc16a.tar.xz
Merge bitcoin/bitcoin#25497: wallet: more accurate target for large transactions
25e4762ae7a09906020e62cd947e9f71300439cf wallet: more accurate tx_noinputs_size (S3RK) Pull request description: Rationale: more accurate non-input fee estimation for txs with >=253 inputs ACKs for top commit: laanwj: Concept and code review ACK 25e4762ae7a09906020e62cd947e9f71300439cf achow101: ACK 25e4762ae7a09906020e62cd947e9f71300439cf furszy: Code review ACK 25e4762a. left a small nit. Tree-SHA512: bda8fad725d32ad3e13c007fa56ddb6679ac1a32098ddb08d9a114054acfa681cb66cd703ac675297f731cb381b09067a99a4efa31320140bbdd03f0cfdc81af
Diffstat (limited to 'src')
-rw-r--r--src/wallet/spend.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/wallet/spend.cpp b/src/wallet/spend.cpp
index 5799a9ff2a..81055a5a1a 100644
--- a/src/wallet/spend.cpp
+++ b/src/wallet/spend.cpp
@@ -760,7 +760,8 @@ static std::optional<CreatedTransactionResult> CreateTransactionInternal(
// vouts to the payees
if (!coin_selection_params.m_subtract_fee_outputs) {
- coin_selection_params.tx_noinputs_size = 11; // Static vsize overhead + outputs vsize. 4 nVersion, 4 nLocktime, 1 input count, 1 output count, 1 witness overhead (dummy, flag, stack size)
+ coin_selection_params.tx_noinputs_size = 10; // Static vsize overhead + outputs vsize. 4 nVersion, 4 nLocktime, 1 input count, 1 witness overhead (dummy, flag, stack size)
+ coin_selection_params.tx_noinputs_size += GetSizeOfCompactSize(vecSend.size()); // bytes for output count
}
for (const auto& recipient : vecSend)
{