]> git.bitcoin.ninja Git - rust-lightning/commit
Fuzz test for parsing Refund
authorJeffrey Czyz <jkczyz@gmail.com>
Fri, 20 Jan 2023 19:01:47 +0000 (13:01 -0600)
committerMatt Corallo <git@bluematt.me>
Thu, 23 Feb 2023 22:19:54 +0000 (22:19 +0000)
commitc4e1ade05ef1cfde30a6af2516003e646d0302fc
tree63d5b1bd9d94d09cce2fd09c9901d1640dd2ca5f
parent9d5df17346dcc984e6893ff32252b5fe08750b46
Fuzz test for parsing Refund

A refund is serialized as a TLV stream and encoded in bech32 without a
checksum. Add a fuzz test that parses the unencoded TLV stream and
deserializes the underlying Refund. Then compare the original bytes with
those obtained by re-serializing the Refund.
fuzz/src/bin/gen_target.sh
fuzz/src/bin/refund_deser_target.rs [new file with mode: 0644]
fuzz/src/lib.rs
fuzz/src/refund_deser.rs [new file with mode: 0644]
fuzz/targets.h
lightning/src/offers/payer.rs
lightning/src/offers/refund.rs