Skip to content

Commit 38a01ed

Browse files
committed
f tests
1 parent ed66196 commit 38a01ed

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lightning/src/util/test_utils.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,8 @@ impl<'a> Router for TestRouter<'a> {
144144
inflight_htlcs: InFlightHtlcs
145145
) -> Result<Route, msgs::LightningError> {
146146
let route_res;
147-
if let Some((find_route_query, find_route_res)) = self.next_routes.lock().unwrap().pop_front() {
147+
let next_route_opt = self.next_routes.lock().unwrap().pop_front();
148+
if let Some((find_route_query, find_route_res)) = next_route_opt {
148149
assert_eq!(find_route_query, *params);
149150
if let Ok(ref route) = find_route_res {
150151
assert_eq!(route.route_params, Some(find_route_query));
@@ -209,7 +210,7 @@ impl<'a> Router for TestRouter<'a> {
209210

210211
if let Ok(route) = &route_res {
211212
// Previously, `Route`s failed to round-trip through serialization due to a write/read
212-
// mismatch. Thus, hwere we test all test-generated routes round-trip:
213+
// mismatch. Thus, here we test all test-generated routes round-trip:
213214
let ser = route.encode();
214215
assert_eq!(Route::read(&mut &ser[..]).unwrap(), *route);
215216
}

0 commit comments

Comments
 (0)