projects
/
rust-lightning
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #2694 from Evanfeenstra/public-scid-utils
[rust-lightning]
/
lightning-invoice
/
src
/
lib.rs
diff --git
a/lightning-invoice/src/lib.rs
b/lightning-invoice/src/lib.rs
index 690bf57640862daae0adb55019ab48d90a2384a0..df0412bfc5d3e0d3876b177200527e01fd272678 100644
(file)
--- a/
lightning-invoice/src/lib.rs
+++ b/
lightning-invoice/src/lib.rs
@@
-77,6
+77,7
@@
mod de;
mod ser;
mod tb;
mod ser;
mod tb;
+#[allow(unused_imports)]
mod prelude {
#[cfg(feature = "hashbrown")]
extern crate hashbrown;
mod prelude {
#[cfg(feature = "hashbrown")]
extern crate hashbrown;
@@
-92,10
+93,6
@@
mod prelude {
use crate::prelude::*;
use crate::prelude::*;
-/// Sync compat for std/no_std
-#[cfg(not(feature = "std"))]
-mod sync;
-
/// Errors that indicate what is wrong with the invoice. They have some granularity for debug
/// reasons, but should generally result in an "invalid BOLT11 invoice" message for the user.
#[allow(missing_docs)]
/// Errors that indicate what is wrong with the invoice. They have some granularity for debug
/// reasons, but should generally result in an "invalid BOLT11 invoice" message for the user.
#[allow(missing_docs)]
@@
-2049,7
+2046,7
@@
mod test {
use lightning::routing::router::RouteHintHop;
use secp256k1::Secp256k1;
use secp256k1::{SecretKey, PublicKey};
use lightning::routing::router::RouteHintHop;
use secp256k1::Secp256k1;
use secp256k1::{SecretKey, PublicKey};
- use std::time::
{UNIX_EPOCH, Duration}
;
+ use std::time::
Duration
;
let secp_ctx = Secp256k1::new();
let secp_ctx = Secp256k1::new();
@@
-2138,7
+2135,7
@@
mod test {
assert_eq!(invoice.currency(), Currency::BitcoinTestnet);
#[cfg(feature = "std")]
assert_eq!(
assert_eq!(invoice.currency(), Currency::BitcoinTestnet);
#[cfg(feature = "std")]
assert_eq!(
- invoice.timestamp().duration_since(UNIX_EPOCH).unwrap().as_secs(),
+ invoice.timestamp().duration_since(
SystemTime::
UNIX_EPOCH).unwrap().as_secs(),
1234567
);
assert_eq!(invoice.payee_pub_key(), Some(&public_key));
1234567
);
assert_eq!(invoice.payee_pub_key(), Some(&public_key));