File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -1682,14 +1682,16 @@ mod test {
1682
1682
. route ( route_1. clone ( ) )
1683
1683
. route ( route_2. clone ( ) )
1684
1684
. description_hash ( sha256:: Hash :: from_slice ( & [ 3 ; 32 ] [ ..] ) . unwrap ( ) )
1685
- . payment_hash ( sha256:: Hash :: from_slice ( & [ 21 ; 32 ] [ ..] ) . unwrap ( ) ) ;
1685
+ . payment_hash ( sha256:: Hash :: from_slice ( & [ 21 ; 32 ] [ ..] ) . unwrap ( ) )
1686
+ . payment_secret ( PaymentSecret ( [ 42 ; 32 ] ) )
1687
+ . basic_mpp ( ) ;
1686
1688
1687
1689
let invoice = builder. clone ( ) . build_signed ( |hash| {
1688
1690
secp_ctx. sign_recoverable ( hash, & private_key)
1689
1691
} ) . unwrap ( ) ;
1690
1692
1691
1693
assert ! ( invoice. check_signature( ) . is_ok( ) ) ;
1692
- assert_eq ! ( invoice. tagged_fields( ) . count( ) , 8 ) ;
1694
+ assert_eq ! ( invoice. tagged_fields( ) . count( ) , 10 ) ;
1693
1695
1694
1696
assert_eq ! ( invoice. amount_pico_btc( ) , Some ( 123 ) ) ;
1695
1697
assert_eq ! ( invoice. currency( ) , Currency :: BitcoinTestnet ) ;
@@ -1707,6 +1709,8 @@ mod test {
1707
1709
InvoiceDescription :: Hash ( & Sha256 ( sha256:: Hash :: from_slice( & [ 3 ; 32 ] [ ..] ) . unwrap( ) ) )
1708
1710
) ;
1709
1711
assert_eq ! ( invoice. payment_hash( ) , & sha256:: Hash :: from_slice( & [ 21 ; 32 ] [ ..] ) . unwrap( ) ) ;
1712
+ assert_eq ! ( invoice. payment_secret( ) , Some ( & PaymentSecret ( [ 42 ; 32 ] ) ) ) ;
1713
+ assert_eq ! ( invoice. features( ) , Some ( & InvoiceFeatures :: known( ) ) ) ;
1710
1714
1711
1715
let raw_invoice = builder. build_raw ( ) . unwrap ( ) ;
1712
1716
assert_eq ! ( raw_invoice, * invoice. into_signed_raw( ) . raw_invoice( ) )
You can’t perform that action at this time.
0 commit comments