Skip to content

Commit 40b7207

Browse files
committed
Refactoring: Typo, removed unused flag.
1 parent 19651a5 commit 40b7207

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

lightning/src/ln/peer_handler.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1866,8 +1866,6 @@ mod tests {
18661866
fn test_do_attempt_write_data() {
18671867
// Create 2 peers with custom TestRoutingMessageHandlers and connect them.
18681868
let cfgs = create_peermgr_cfgs(2);
1869-
cfgs[0].routing_handler.request_full_sync.store(true, Ordering::Release);
1870-
cfgs[1].routing_handler.request_full_sync.store(true, Ordering::Release);
18711869
let peers = create_network(2, &cfgs);
18721870

18731871
// By calling establish_connect, we trigger do_attempt_write_data between
@@ -1879,7 +1877,7 @@ mod tests {
18791877
let (mut fd_a, mut fd_b) = establish_connection(&peers[0], &peers[1]);
18801878

18811879
// Make each peer to read the messages that the other peer just wrote to them. Note that
1882-
// due to the max-messagse-before-ping limits this may take a few iterations to complete.
1880+
// due to the max-message-before-ping limits this may take a few iterations to complete.
18831881
for _ in 0..150/super::BUFFER_DRAIN_MSGS_PER_TICK + 1 {
18841882
peers[0].process_events();
18851883
let b_read_data = fd_a.outbound_data.lock().unwrap().split_off(0);
@@ -1909,8 +1907,6 @@ mod tests {
19091907
// Tests that we time out a peer still waiting on handshake completion after a full timer
19101908
// tick.
19111909
let cfgs = create_peermgr_cfgs(2);
1912-
cfgs[0].routing_handler.request_full_sync.store(true, Ordering::Release);
1913-
cfgs[1].routing_handler.request_full_sync.store(true, Ordering::Release);
19141910
let peers = create_network(2, &cfgs);
19151911

19161912
let secp_ctx = Secp256k1::new();

lightning/src/util/test_utils.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ use io;
4444
use prelude::*;
4545
use core::time::Duration;
4646
use sync::{Mutex, Arc};
47-
use core::sync::atomic::{AtomicBool, AtomicUsize, Ordering};
47+
use core::sync::atomic::{AtomicUsize, Ordering};
4848
use core::{cmp, mem};
4949
use bitcoin::bech32::u5;
5050
use chain::keysinterface::{InMemorySigner, Recipient, KeyMaterial};
@@ -341,15 +341,13 @@ fn get_dummy_channel_update(short_chan_id: u64) -> msgs::ChannelUpdate {
341341
pub struct TestRoutingMessageHandler {
342342
pub chan_upds_recvd: AtomicUsize,
343343
pub chan_anns_recvd: AtomicUsize,
344-
pub request_full_sync: AtomicBool,
345344
}
346345

347346
impl TestRoutingMessageHandler {
348347
pub fn new() -> Self {
349348
TestRoutingMessageHandler {
350349
chan_upds_recvd: AtomicUsize::new(0),
351350
chan_anns_recvd: AtomicUsize::new(0),
352-
request_full_sync: AtomicBool::new(false),
353351
}
354352
}
355353
}

0 commit comments

Comments
 (0)