rust-bitcoin-unsafe-fast/bitcoin/tests
Tobin C. Harding c950ef4bbd
Add transaction::Version data type
BIP-68 activated a fair while ago (circa 2019) and since then only
transaction versions 1 and 2 have been considered standard.

Currently in our `Transaction` struct we use an `i32`, this means users
can construct a non-standard transaction if they do not first look up
what the value should be. We can help folk out here by abstracting over
the version number.

Since the version number only governs standardness elect to make the
inner `i32` public (ie., not an invariant). The aim of the type is to
make life easy not restrict what versions are used.

Add transaction::Version data type that simply provides two consts `ONE`
and `TWO`.

Add a `Default` impl on `Version` that returns `Version::TWO`.

In tests that used version 0, instead use `Version::default` because the
test obviously does not care.
2023-09-21 15:02:02 +10:00
..
data Remove serde for taprootspendinfo 2023-03-01 16:58:24 -08:00
psbt.rs Add transaction::Version data type 2023-09-21 15:02:02 +10:00
serde.rs Add transaction::Version data type 2023-09-21 15:02:02 +10:00
serde_opcodes.rs Add serde regression tests 2022-10-29 10:47:16 +11:00