diff options
author | S3RK <1466284+S3RK@users.noreply.github.com> | 2022-04-04 09:47:58 +0200 |
---|---|---|
committer | S3RK <1466284+S3RK@users.noreply.github.com> | 2022-06-29 09:02:20 +0200 |
commit | 25e4762ae7a09906020e62cd947e9f71300439cf (patch) | |
tree | 614f2381e75ca4cba834281af0f3808b0426c27f /src | |
parent | 72d6469ab4f6db9570e29a901f021178f110ca44 (diff) | |
download | bitcoin-25e4762ae7a09906020e62cd947e9f71300439cf.tar.xz |
wallet: more accurate tx_noinputs_size
Diffstat (limited to 'src')
-rw-r--r-- | src/wallet/spend.cpp | 3 |
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) { |