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;
157
157
use lightning:: routing:: router:: { PaymentParameters , RouteParameters } ;
158
158
use lightning_invoice:: { payment, Bolt11Invoice , Currency } ;
159
159
160
- use bitcoin:: hashes:: sha256:: Hash as Sha256 ;
161
160
use bitcoin:: hashes:: Hash ;
162
161
use bitcoin:: secp256k1:: PublicKey ;
163
162
@@ -1301,7 +1300,7 @@ impl<K: KVStore + Sync + Send + 'static> Node<K> {
1301
1300
}
1302
1301
1303
1302
let payment_preimage = PaymentPreimage ( self . keys_manager . get_secure_random_bytes ( ) ) ;
1304
- let payment_hash = PaymentHash ( Sha256 :: hash ( & payment_preimage. 0 ) . to_byte_array ( ) ) ;
1303
+ let payment_hash = PaymentHash :: from ( payment_preimage) ;
1305
1304
1306
1305
if let Some ( payment) = self . payment_store . get ( & payment_hash) {
1307
1306
if payment. status == PaymentStatus :: Pending
You can’t perform that action at this time.
0 commit comments