X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;ds=sidebyside;f=lightning-invoice%2Ftests%2Fser_de.rs;h=442166e740e7568f0a25b24883c1f3ad0e016f2e;hb=c9d1ed5c14fc465ce702f44870aae99945675b3d;hp=cce8cca916a3afa6f85b7f7c28c34a902c434fb3;hpb=3b67be235a46d8f9a9a6faf7ca7c5872ffbd8646;p=rust-lightning diff --git a/lightning-invoice/tests/ser_de.rs b/lightning-invoice/tests/ser_de.rs index cce8cca9..442166e7 100644 --- a/lightning-invoice/tests/ser_de.rs +++ b/lightning-invoice/tests/ser_de.rs @@ -103,7 +103,7 @@ fn get_test_tuples() -> Vec<(String, SignedRawInvoice, Option)> { None ), ( - "lnbc20m1pvjluezpp5qqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqypqdq5vdhkven9v5sxyetpdeessp59g4z52329g4z52329g4z52329g4z52329g4z52329g4z52329g4q9gkzyrw8zhfxmrcxsx7hj40yejq6lkvn75l9yjmapjv94haz8x8jy2tvmgex8rnyqkj825csd2t64fu0p4ctad2cf4tgy5gh2fns6ygp6pnc3y".to_owned(), + "lnbc20m1pvjluezpp5qqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqypqdq5vdhkven9v5sxyetpdeessp59g4z52329g4z52329g4z52329g4z52329g4z52329g4z52329g4q9qrsgqzfhag3vsafx4e5qssalvw4rn0phsvpp3e5h2xxyk9l8fxsutvndx9t840dqvdrlu2gqmk0q8apqrgnjy9amc07hmjl9e9yzqjks5w2gqgjnyms".to_owned(), InvoiceBuilder::new(Currency::Bitcoin) .payment_hash(sha256::Hash::from_hex( "0001020304050607080900010203040506070809000102030405060708090102" @@ -112,13 +112,14 @@ fn get_test_tuples() -> Vec<(String, SignedRawInvoice, Option)> { .amount_pico_btc(20000000000) .timestamp(UNIX_EPOCH + Duration::from_secs(1496314658)) .payment_secret(PaymentSecret([42; 32])) - .build_signed(|msg_hash| { + .build_raw() + .unwrap() + .sign::<_, ()>(|msg_hash| { let privkey = SecretKey::from_slice(&[41; 32]).unwrap(); let secp_ctx = Secp256k1::new(); - secp_ctx.sign_recoverable(msg_hash, &privkey) + Ok(secp_ctx.sign_recoverable(msg_hash, &privkey)) }) - .unwrap() - .into_signed_raw(), + .unwrap(), None ) ]