mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-11-20 02:25:40 +01:00
wallet: more accurate tx_noinputs_size
This commit is contained in:
parent
72d6469ab4
commit
25e4762ae7
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user