Skip to content

Commit

Permalink
f - fuzz fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jkczyz committed Mar 6, 2024
1 parent a8cc5fe commit 615d0dd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions fuzz/src/invoice_request_deser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,17 @@ pub fn do_test<Out: test_logger::Output>(data: &[u8], _out: Out) {
let even_pubkey = x_only_pubkey.public_key(Parity::Even);
if signing_pubkey == odd_pubkey || signing_pubkey == even_pubkey {
unsigned_invoice
.sign::<_, Infallible>(|message: &UnsignedBolt12Invoice|
.sign(|message: &UnsignedBolt12Invoice| -> Result<_, Infallible> {
Ok(secp_ctx.sign_schnorr_no_aux_rand(message.as_ref().as_digest(), &keys))
)
})
.unwrap()
.write(&mut buffer)
.unwrap();
} else {
unsigned_invoice
.sign::<_, Infallible>(|message: &UnsignedBolt12Invoice|
.sign(|message: &UnsignedBolt12Invoice| -> Result<_, Infallible> {
Ok(secp_ctx.sign_schnorr_no_aux_rand(message.as_ref().as_digest(), &keys))
)
})
.unwrap_err();
}
}
Expand Down
4 changes: 2 additions & 2 deletions fuzz/src/offer_deser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ pub fn do_test<Out: test_logger::Output>(data: &[u8], _out: Out) {

if let Ok(invoice_request) = build_response(&offer, pubkey) {
invoice_request
.sign::<_, Infallible>(|message: &UnsignedInvoiceRequest|
.sign(|message: &UnsignedInvoiceRequest| -> Result<_, Infallible> {
Ok(secp_ctx.sign_schnorr_no_aux_rand(message.as_ref().as_digest(), &keys))
)
})
.unwrap()
.write(&mut buffer)
.unwrap();
Expand Down
4 changes: 2 additions & 2 deletions fuzz/src/refund_deser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ pub fn do_test<Out: test_logger::Output>(data: &[u8], _out: Out) {

if let Ok(invoice) = build_response(&refund, pubkey, &secp_ctx) {
invoice
.sign::<_, Infallible>(|message: &UnsignedBolt12Invoice|
.sign(|message: &UnsignedBolt12Invoice| -> Result<_, Infallible> {
Ok(secp_ctx.sign_schnorr_no_aux_rand(message.as_ref().as_digest(), &keys))
)
})
.unwrap()
.write(&mut buffer)
.unwrap();
Expand Down

0 comments on commit 615d0dd

Please sign in to comment.