projects
/
rust-lightning
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
`rustfmt`: `lightning-transaction-sync/tests/integration_tests.rs`
[rust-lightning]
/
lightning-invoice
/
src
/
payment.rs
diff --git
a/lightning-invoice/src/payment.rs
b/lightning-invoice/src/payment.rs
index b8f564ef573bf9b37dba86350bf73df745f42b0a..a8ffce7bbd9604d8583da0fdbaf2a2254f749b17 100644
(file)
--- a/
lightning-invoice/src/payment.rs
+++ b/
lightning-invoice/src/payment.rs
@@
-12,7
+12,7
@@
use crate::Bolt11Invoice;
use bitcoin::hashes::Hash;
use crate::Bolt11Invoice;
use bitcoin::hashes::Hash;
-use lightning::ln::PaymentHash;
+use lightning::ln::
types::
PaymentHash;
use lightning::ln::channelmanager::RecipientOnionFields;
use lightning::routing::router::{PaymentParameters, RouteParameters};
use lightning::ln::channelmanager::RecipientOnionFields;
use lightning::routing::router::{PaymentParameters, RouteParameters};
@@
-85,14
+85,12
@@
mod tests {
use super::*;
use crate::{InvoiceBuilder, Currency};
use bitcoin::hashes::sha256::Hash as Sha256;
use super::*;
use crate::{InvoiceBuilder, Currency};
use bitcoin::hashes::sha256::Hash as Sha256;
- use lightning::events::Event;
- use lightning::ln::channelmanager::{Retry, PaymentId};
- use lightning::ln::msgs::ChannelMessageHandler;
- use lightning::ln::PaymentSecret;
- use lightning::ln::functional_test_utils::*;
+ use lightning::ln::types::PaymentSecret;
use lightning::routing::router::Payee;
use secp256k1::{SecretKey, PublicKey, Secp256k1};
use lightning::routing::router::Payee;
use secp256k1::{SecretKey, PublicKey, Secp256k1};
- use std::time::{SystemTime, Duration};
+ use core::time::Duration;
+ #[cfg(feature = "std")]
+ use std::time::SystemTime;
fn duration_since_epoch() -> Duration {
#[cfg(feature = "std")]
fn duration_since_epoch() -> Duration {
#[cfg(feature = "std")]
@@
-171,6
+169,10
@@
mod tests {
#[test]
#[cfg(feature = "std")]
fn payment_metadata_end_to_end() {
#[test]
#[cfg(feature = "std")]
fn payment_metadata_end_to_end() {
+ use lightning::events::Event;
+ use lightning::ln::channelmanager::{Retry, PaymentId};
+ use lightning::ln::msgs::ChannelMessageHandler;
+ use lightning::ln::functional_test_utils::*;
// Test that a payment metadata read from an invoice passed to `pay_invoice` makes it all
// the way out through the `PaymentClaimable` event.
let chanmon_cfgs = create_chanmon_cfgs(2);
// Test that a payment metadata read from an invoice passed to `pay_invoice` makes it all
// the way out through the `PaymentClaimable` event.
let chanmon_cfgs = create_chanmon_cfgs(2);