Matt Corallo
56491d91bb
Simplify HolderHTLCOutput constructor and track CLTV expiry
...
This allows us to interrogate a PackageTemplate for the CLTV
timelock of the resulting transaction.
2021-05-28 23:56:44 +00:00
Matt Corallo
f492a192ff
Add assertions to ensure we don't use an invalid package_amount
...
This somewhat cleans up the public API of PackageSolvingData to
make it harder to get an invalid amount and use it, adding further
debug assertion to check it at test-time.
2021-05-28 23:56:44 +00:00
Matt Corallo
df829a8526
Merge pull request #928 from TheBlueMatt/2021-05-really-tlv-ser
...
Migrate some inner structs to TLVs
2021-05-27 23:05:47 +00:00
Matt Corallo
45d86ead64
Migrate packages sub-fields to TLV serialization
2021-05-27 21:41:24 +00:00
Matt Corallo
a7494228c9
Add TLV suffix to PackageTemplate
2021-05-27 21:41:07 +00:00
Gene Ferneau
12461fcba1
Use alloc for no_std builds
...
Replace std structs with alloc equivalents to support no_std builds
f use prelude::* credit @devrandom
2021-05-27 17:35:20 +00:00
Antoine Riard
c40ebf18e5
Add package template unit tests
2021-05-25 23:18:56 -04:00
Antoine Riard
881c0f58e1
Move compute_output_value as part of package member functions
2021-05-25 19:59:40 -04:00
Antoine Riard
bb0e33f383
Move get_height_timer out of OnchainTxHandler
2021-05-25 19:59:40 -04:00
Antoine Riard
4363f965d6
Move onchain* to chain/
2021-05-25 19:59:40 -04:00