bitcoin/tx_parts: infrastructure for partial bitcoin txs.

`struct tx_parts` is just a txid and a bunch of inputs and outputs,
some of which may be NULL.

This is both a nod towards a future where we (or our peer) can combine
HTLCs or (in an eltoo world) commitments, although for the moment all
our tx_parts will be complete.

It also matches our plan to split `bitcoin_tx` into two types: this
`struct tx_parts` where we don't know input amounts etc, and `psbt`
where we do.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2020-05-26 13:09:40 +09:30
parent 7e48f77d43
commit dafaf854c5
4 changed files with 428 additions and 0 deletions

View File

@@ -234,6 +234,7 @@ class Type(FieldSet):
'feature_set',
'onionmsg_path',
'route_hop',
'tx_parts',
]
# Some BOLT types are re-typed based on their field name