rust-bitcoin-unsafe-fast/bitcoin
Martin Habovstiak cf068d16b0 Implement transaction weight prediction
When creating a transaction one must know the the fee beforehand to set
appropriate amounts for outputs and to know the fee, weight is required.
So far we only had a method on an already-constructed transaction. This
method clearly wasn't helpful when constructing the transaction except
for hacks like temporarily adding an all-zeroes signature.

This change adds a function that can compute the transaction weight
without knowing individual bytes of the scripts, witnesses and other
elements. It only needs to know their sizes.

To make the API less error-prone a special, trivial, type is also added
for computing the lengths of witnesses.
2023-02-11 12:57:37 +01:00
..
contrib Remove rand-std dev-dependency from secp256k1 2022-12-23 08:33:21 +11:00
embedded Instruct devs to use nightly for embedded 2023-02-03 08:44:47 +11:00
examples Remove FromHex for all types except Vec and array 2023-02-01 08:26:46 +11:00
fuzz Add `Weight` and `FeeRate` newtypes 2023-02-08 23:17:30 +01:00
src Implement transaction weight prediction 2023-02-11 12:57:37 +01:00
tests Rename from_slice methods to decode 2023-02-07 14:54:08 +11:00
CHANGELOG.md add some documentation clarifying the locktime ordering shenanigans in #1330 2022-12-15 23:12:03 +00:00
Cargo.toml Set rustv_1_53 in build script 2023-02-02 10:12:16 +11:00
build.rs Set rustv_1_53 in build script 2023-02-02 10:12:16 +11:00