rust-bitcoin-unsafe-fast/bitcoin
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
..
contrib hashes: Bump version to 0.13.0 2023-08-24 12:25:42 +10:00
embedded Add patch section to test crates 2023-07-18 10:27:48 +10:00
examples Add transaction::Version data type 2023-09-21 15:02:02 +10:00
src Add transaction::Version data type 2023-09-21 15:02:02 +10:00
tests Add transaction::Version data type 2023-09-21 15:02:02 +10:00
CHANGELOG.md Add changelo entry for removal of FromHex 2023-05-18 14:18:42 +10:00
Cargo.toml Update base64 usage to 0.21.3 2023-08-30 22:47:56 -07:00
build.rs Remove rust_v_1_46 2023-03-23 08:27:10 +11:00