Skip to content

Commit 2c07936

Browse files
committed
f vecdeque
1 parent 3222239 commit 2c07936

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

lightning-invoice/src/payment.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -460,8 +460,8 @@ mod tests {
460460
use lightning::util::events::{Event, MessageSendEventsProvider};
461461
use secp256k1::{SecretKey, PublicKey, Secp256k1};
462462
use std::cell::RefCell;
463+
use std::collections::VecDeque;
463464
use std::time::{SystemTime, Duration};
464-
use std::collections::LinkedList;
465465
use std::sync::Mutex;
466466

467467
fn invoice(payment_preimage: PaymentPreimage) -> Invoice {
@@ -1052,13 +1052,13 @@ mod tests {
10521052
}
10531053

10541054
struct TestScorer {
1055-
expectations: std::collections::VecDeque<u64>,
1055+
expectations: VecDeque<u64>,
10561056
}
10571057

10581058
impl TestScorer {
10591059
fn new() -> Self {
10601060
Self {
1061-
expectations: std::collections::VecDeque::new(),
1061+
expectations: VecDeque::new(),
10621062
}
10631063
}
10641064

@@ -1093,15 +1093,15 @@ mod tests {
10931093
}
10941094

10951095
struct TestPayer {
1096-
expectations: core::cell::RefCell<std::collections::VecDeque<u64>>,
1096+
expectations: core::cell::RefCell<VecDeque<u64>>,
10971097
attempts: core::cell::RefCell<usize>,
10981098
failing_on_attempt: Option<usize>,
10991099
}
11001100

11011101
impl TestPayer {
11021102
fn new() -> Self {
11031103
Self {
1104-
expectations: core::cell::RefCell::new(std::collections::VecDeque::new()),
1104+
expectations: core::cell::RefCell::new(VecDeque::new()),
11051105
attempts: core::cell::RefCell::new(0),
11061106
failing_on_attempt: None,
11071107
}
@@ -1188,7 +1188,7 @@ mod tests {
11881188
}
11891189

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

11931193
impl<S: routing::Score> Router<S> for ManualRouter {
11941194
fn find_route(&self, _payer: &PublicKey, _params: &RouteParameters, _first_hops: Option<&[&ChannelDetails]>, _scorer: &S)
@@ -1238,7 +1238,7 @@ mod tests {
12381238
],
12391239
payee: Some(Payee::new(nodes[1].node.get_our_node_id())),
12401240
};
1241-
let mut routes = LinkedList::new();
1241+
let mut routes = VecDeque::new();
12421242
routes.push_back(Ok(route.clone()));
12431243
// On retry, split the payment across both channels.
12441244
route.paths[0][0].fee_msat = 50_000_001;

0 commit comments

Comments
 (0)