File tree Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Original file line number Diff line number Diff line change @@ -157,7 +157,6 @@ use lightning_transaction_sync::EsploraSyncClient;
157157use lightning:: routing:: router:: { PaymentParameters , RouteParameters } ;
158158use lightning_invoice:: { payment, Bolt11Invoice , Currency } ;
159159
160- use bitcoin:: hashes:: sha256:: Hash as Sha256 ;
161160use bitcoin:: hashes:: Hash ;
162161use bitcoin:: secp256k1:: PublicKey ;
163162
@@ -1230,7 +1229,7 @@ impl<K: KVStore + Sync + Send + 'static> Node<K> {
12301229 }
12311230
12321231 let payment_preimage = PaymentPreimage ( self . keys_manager . get_secure_random_bytes ( ) ) ;
1233- let payment_hash = PaymentHash ( Sha256 :: hash ( & payment_preimage. 0 ) . to_byte_array ( ) ) ;
1232+ let payment_hash = PaymentHash :: from ( payment_preimage) ;
12341233
12351234 if let Some ( payment) = self . payment_store . get ( & payment_hash) {
12361235 if payment. status == PaymentStatus :: Pending
You can’t perform that action at this time.
0 commit comments