bolt: implement tx_add_output message codec#26
Conversation
kushagra0902
left a comment
There was a problem hiding this comment.
The PR looks good to me with everything handled properly
ecec0ed to
eb6d3d4
Compare
Good catch. The bitcoin crate was added as part of the tx_add_input PR (#23) which hasn't merged yet. Added it directly to this branch -- should compile now. |
I was working at something else and had the package already that bypassed the error, good catch @Vineet1101 |
eb6d3d4 to
643d73c
Compare
|
Done, script is now Vec, added the assert on script.len() in encode(), and split out truncation tests for the script length and script data fields. |
643d73c to
1404d3b
Compare
1404d3b to
915779d
Compare


Implements the
tx_add_outputcodec (type 67) for BOLT 2 interactive-tx.The script field is a variable-length scriptPubKey, length-prefixed via the WireFormat trait. Tests cover roundtrip, empty script, trailing bytes, and truncation at each field boundary.
Part of #5.