Skip to content

Commit d3803f4

Browse files
fixup! feat(offers): add BOLT 12 payer proof primitives
Co-Authored-By: OpenAI Codex <noreply@openai.com>
1 parent ebe9932 commit d3803f4

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

lightning/src/offers/payer_proof.rs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -713,13 +713,9 @@ impl DisclosedFields {
713713
}
714714

715715
// Payer proofs use manual TLV parsing rather than `ParsedMessage` / `tlv_stream!`
716-
// because of their hybrid structure: a dynamic, variable set of included invoice
717-
// TLV records (types 0-239, preserved as raw bytes for merkle reconstruction) plus
718-
// payer-proof-specific TLVs (types 240-250) with non-standard encodings such as
719-
// BigSize lists (`omitted_tlvs`) and concatenated 32-byte hashes
720-
// (`missing_hashes`, `leaf_hashes`). The `tlv_stream!` macro assumes a fixed set
721-
// of known fields with standard `Readable`/`Writeable` encodings, so it cannot
722-
// express the passthrough-or-parse logic required here.
716+
// because `reconstruct_merkle_root` needs the original bytes of the selectively
717+
// disclosed invoice records. The standard helpers parse typed fields, but they
718+
// do not preserve the passthrough record bytes needed for merkle reconstruction.
723719
impl TryFrom<Vec<u8>> for PayerProof {
724720
type Error = Bolt12ParseError;
725721

0 commit comments

Comments
 (0)