You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge #476: Another attempt at max_satisfaction_weight fixes
7296f8e Introduce `max_weight_to_satisfy` (志宇)
Pull request description:
Replaces #474, refer to #474 (comment)
This PR has two intentions:
1. Redefine `max_satisfaction_weight` to be the difference in `TxIn` weight between "satisfied" and "unsatisfied" states. In an "unsatisfied" state, we still need to include the `scriptSigLen` varint, as well as the `witnessStackLen` (for txs with at least one segwit spend).
2. Attempt further fixes to improve accuracy of `max_satisfaction_weight`.
Comments, tests and examples have been updated to reflect the above intentions.
### Notes for reviewers
The new definition of `max_satisfaction_weight` can be seen in this comment:
https://github.com/rust-bitcoin/rust-miniscript/blob/08cff39fa862ff957c7ff96d17a0011dd6446f87/src/descriptor/mod.rs#L320-L339
ACKs for top commit:
sanket1729:
ACK 7296f8e
Tree-SHA512: ecae8ff742198289b598aefde83ad66a4b7c7cb67da0625b4d84271df510331408c3da6fc8796fc234ce095af08a2f34a5beb5a10549d7ce20a9878b3ab6fd47
0 commit comments