Skip to content

Commit 66fe2d4

Browse files
committed
merge bitcoin#25497: more accurate target for large transactions
1 parent 6e4d789 commit 66fe2d4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/wallet/spend.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -747,7 +747,8 @@ bool CWallet::CreateTransactionInternal(
747747

748748
// vouts to the payees
749749
if (!coin_selection_params.m_subtract_fee_outputs) {
750-
coin_selection_params.tx_noinputs_size = 10; // Static vsize overhead + outputs vsize. 4 nVersion, 4 nLocktime, 1 input count, 1 output count
750+
coin_selection_params.tx_noinputs_size = 9; // Static vsize overhead + outputs vsize. 4 nVersion, 4 nLocktime, 1 input count
751+
coin_selection_params.tx_noinputs_size += GetSizeOfCompactSize(vecSend.size()); // bytes for output count
751752
}
752753
for (const auto& recipient : vecSend)
753754
{

0 commit comments

Comments
 (0)