Commit Graph

4 Commits

Author SHA1 Message Date
Tobin C. Harding 0ed78e543b Add lock time types
Add a `LockTime` type to hold the nLockTime `u32` value. Use it in
`Transaction` for `lock_time` instead of a `u32`. Make it public so this
new type can be used by rust-miniscript and other downstream projects.

Add a `PackedLockTime` type that wraps a raw `u32` and derives `Ord`,
this type is for wrapping a consensus lock time value for nesting in
types that would like to derive `Ord`.
2022-07-27 08:39:19 +10:00
0xb10c ee29910911
BIP152: Test net msg ser/der and diff encoding
This adds tests for serialization of BIP152 network messages and
tests specifically for the differential encoding of the transaction
indicies of 'getblocktx'. Previously, this code contained an
off-by-one error.
2022-07-24 13:21:14 +02:00
Steven Roose cd1aaaf344
BIP152: Add Compact Block unit test based on Elements 2022-07-24 13:21:12 +02:00
Steven Roose f2fcdc86e6
BIP152: Add basic Compact Block structures 2022-07-24 13:21:08 +02:00