projects
/
rust-lightning
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
(prob) f use new simd impl wrappers
[rust-lightning]
/
lightning-invoice
/
src
/
payment.rs
diff --git
a/lightning-invoice/src/payment.rs
b/lightning-invoice/src/payment.rs
index a7c9104d3697e774c03c03ef3cee3d7eadc0989c..7306d12f5e6c0061825ebf1d2fde3c2decafde79 100644
(file)
--- a/
lightning-invoice/src/payment.rs
+++ b/
lightning-invoice/src/payment.rs
@@
-10,8
+10,7
@@
//! Convenient utilities for paying Lightning invoices.
use crate::Bolt11Invoice;
//! Convenient utilities for paying Lightning invoices.
use crate::Bolt11Invoice;
-
-use bitcoin_hashes::Hash;
+use crate::bitcoin_hashes::Hash;
use lightning::ln::PaymentHash;
use lightning::ln::channelmanager::RecipientOnionFields;
use lightning::ln::PaymentHash;
use lightning::ln::channelmanager::RecipientOnionFields;
@@
-60,7
+59,7
@@
pub fn payment_parameters_from_invoice(invoice: &Bolt11Invoice)
fn params_from_invoice(invoice: &Bolt11Invoice, amount_msat: u64)
-> (PaymentHash, RecipientOnionFields, RouteParameters) {
fn params_from_invoice(invoice: &Bolt11Invoice, amount_msat: u64)
-> (PaymentHash, RecipientOnionFields, RouteParameters) {
- let payment_hash = PaymentHash((*invoice.payment_hash()).
into_inner
());
+ let payment_hash = PaymentHash((*invoice.payment_hash()).
to_byte_array
());
let mut recipient_onion = RecipientOnionFields::secret_only(*invoice.payment_secret());
recipient_onion.payment_metadata = invoice.payment_metadata().map(|v| v.clone());
let mut recipient_onion = RecipientOnionFields::secret_only(*invoice.payment_secret());
recipient_onion.payment_metadata = invoice.payment_metadata().map(|v| v.clone());