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 #2998 from tnull/2024-04-fix-potential-lock-race-in-CM-write
[rust-lightning]
/
lightning-invoice
/
src
/
lib.rs
diff --git
a/lightning-invoice/src/lib.rs
b/lightning-invoice/src/lib.rs
index 5b326911444cece5a8b032732f9da24985b2ca25..20eaf7a82d27a7970872883536f7edce1da55c69 100644
(file)
--- a/
lightning-invoice/src/lib.rs
+++ b/
lightning-invoice/src/lib.rs
@@
-31,7
+31,6
@@
pub mod utils;
extern crate bech32;
#[macro_use] extern crate lightning;
extern crate bech32;
#[macro_use] extern crate lightning;
-extern crate num_traits;
extern crate secp256k1;
extern crate alloc;
#[cfg(any(test, feature = "std"))]
extern crate secp256k1;
extern crate alloc;
#[cfg(any(test, feature = "std"))]
@@
-2064,7
+2063,7
@@
mod test {
let route_1 = RouteHint(vec![
RouteHintHop {
src_node_id: public_key,
let route_1 = RouteHint(vec![
RouteHintHop {
src_node_id: public_key,
- short_channel_id:
de::parse_int_be(&[123; 8], 256).expect("short chan ID slice too big?"
),
+ short_channel_id:
u64::from_be_bytes([123; 8]
),
fees: RoutingFees {
base_msat: 2,
proportional_millionths: 1,
fees: RoutingFees {
base_msat: 2,
proportional_millionths: 1,
@@
-2075,7
+2074,7
@@
mod test {
},
RouteHintHop {
src_node_id: public_key,
},
RouteHintHop {
src_node_id: public_key,
- short_channel_id:
de::parse_int_be(&[42; 8], 256).expect("short chan ID slice too big?"
),
+ short_channel_id:
u64::from_be_bytes([42; 8]
),
fees: RoutingFees {
base_msat: 3,
proportional_millionths: 2,
fees: RoutingFees {
base_msat: 3,
proportional_millionths: 2,
@@
-2100,7
+2099,7
@@
mod test {
},
RouteHintHop {
src_node_id: public_key,
},
RouteHintHop {
src_node_id: public_key,
- short_channel_id:
de::parse_int_be(&[1; 8], 256).expect("short chan ID slice too big?"
),
+ short_channel_id:
u64::from_be_bytes([1; 8]
),
fees: RoutingFees {
base_msat: 5,
proportional_millionths: 4,
fees: RoutingFees {
base_msat: 5,
proportional_millionths: 4,