]> Untitled Git - bdk/commit
TXIN_BASE_WEIGHT shouldn't include the script len
authorDaniela Brozzoni <danielabrozzoni@protonmail.com>
Tue, 2 Aug 2022 10:06:54 +0000 (12:06 +0200)
committerDaniela Brozzoni <danielabrozzoni@protonmail.com>
Tue, 2 Aug 2022 10:08:52 +0000 (12:08 +0200)
commit7ac87b8f99fc0897753ce57d48ea24adf495a633
treeeee6dc8f747e384a6712e76f8ce926ef8d74a30a
parentac051d7ae9512883e11a89ab002ad2d2c3c55c19
TXIN_BASE_WEIGHT shouldn't include the script len

We would before calculate the TXIN_BASE_WEIGHT as prev_txid (32 bytes) +
prev_vout (4 bytes) + sequence (4 bytes) + script_sig_len (1 bytes), but
that's wrong: the script_sig_len shouldn't be included, as miniscript
already includes it in the `max_satisfaction_size` calculation.
Fixes #160
src/wallet/coin_selection.rs