Skip to content

Commit bf958e1

Browse files
committed
f vecdeque
1 parent 88d2f70 commit bf958e1

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

lightning-invoice/src/payment.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -448,8 +448,8 @@ mod tests {
448448
use lightning::util::events::{Event, MessageSendEventsProvider};
449449
use secp256k1::{SecretKey, PublicKey, Secp256k1};
450450
use std::cell::RefCell;
451+
use std::collections::VecDeque;
451452
use std::time::{SystemTime, Duration};
452-
use std::collections::LinkedList;
453453
use std::sync::Mutex;
454454

455455
fn invoice(payment_preimage: PaymentPreimage) -> Invoice {
@@ -1040,13 +1040,13 @@ mod tests {
10401040
}
10411041

10421042
struct TestScorer {
1043-
expectations: std::collections::VecDeque<u64>,
1043+
expectations: VecDeque<u64>,
10441044
}
10451045

10461046
impl TestScorer {
10471047
fn new() -> Self {
10481048
Self {
1049-
expectations: std::collections::VecDeque::new(),
1049+
expectations: VecDeque::new(),
10501050
}
10511051
}
10521052

@@ -1081,15 +1081,15 @@ mod tests {
10811081
}
10821082

10831083
struct TestPayer {
1084-
expectations: core::cell::RefCell<std::collections::VecDeque<u64>>,
1084+
expectations: core::cell::RefCell<VecDeque<u64>>,
10851085
attempts: core::cell::RefCell<usize>,
10861086
failing_on_attempt: Option<usize>,
10871087
}
10881088

10891089
impl TestPayer {
10901090
fn new() -> Self {
10911091
Self {
1092-
expectations: core::cell::RefCell::new(std::collections::VecDeque::new()),
1092+
expectations: core::cell::RefCell::new(VecDeque::new()),
10931093
attempts: core::cell::RefCell::new(0),
10941094
failing_on_attempt: None,
10951095
}
@@ -1176,7 +1176,7 @@ mod tests {
11761176
}
11771177

11781178
// *** Full Featured Functional Tests with a Real ChannelManager ***
1179-
struct ManualRouter(Mutex<LinkedList<Result<Route, LightningError>>>);
1179+
struct ManualRouter(Mutex<VecDeque<Result<Route, LightningError>>>);
11801180

11811181
impl<S: routing::Score> Router<S> for ManualRouter {
11821182
fn find_route(&self, _payer: &PublicKey, _params: &RouteParameters, _first_hops: Option<&[&ChannelDetails]>, _scorer: &S)
@@ -1226,7 +1226,7 @@ mod tests {
12261226
],
12271227
payee: Some(Payee::new(nodes[1].node.get_our_node_id())),
12281228
};
1229-
let mut routes = LinkedList::new();
1229+
let mut routes = VecDeque::new();
12301230
routes.push_back(Ok(route.clone()));
12311231
// On retry, split the payment across both channels.
12321232
route.paths[0][0].fee_msat = 50_000_001;
@@ -1271,7 +1271,7 @@ mod tests {
12711271
],
12721272
payee: Some(Payee::new(nodes[1].node.get_our_node_id())),
12731273
};
1274-
let mut routes = LinkedList::new();
1274+
let mut routes = VecDeque::new();
12751275
routes.push_back(Ok(route.clone()));
12761276
// On retry, split the payment across both channels.
12771277
route.paths.push(route.paths[0].clone());

0 commit comments

Comments
 (0)