use bitcoin::secp256k1::PublicKey;
-use tokio::net::{tcp, TcpStream};
-use tokio::{io, time};
+use tokio::net::TcpStream;
+use tokio::time;
use tokio::sync::mpsc;
-use tokio::io::AsyncWrite;
use lightning::ln::peer_handler;
use lightning::ln::peer_handler::SocketDescriptor as LnSocketTrait;
// readable() is allowed to spuriously wake, so we have to handle
// WouldBlock here.
},
- Err(e) => break Disconnect::PeerDisconnected,
+ Err(_) => break Disconnect::PeerDisconnected,
}
},
}
written_len += res;
if written_len == data.len() { return written_len; }
},
- Err(e) => return written_len,
+ Err(_) => return written_len,
}
},
- task::Poll::Ready(Err(e)) => return written_len,
+ task::Poll::Ready(Err(_)) => return written_len,
task::Poll::Pending => {
// We're queued up for a write event now, but we need to make sure we also
// pause read given we're now waiting on the remote end to ACK (and in
#[macro_use]
pub mod functional_test_utils;
-pub mod channel_id;
pub mod channelmanager;
pub mod inbound_payment;
pub mod msgs;
pub mod chan_utils;
pub mod features;
pub mod script;
+mod channel_id;
#[cfg(fuzzing)]
pub mod peer_channel_encryptor;
pub(crate) mod channel;
// Re-export ChannelId
-pub use self::channel_id::ChannelId;
+pub use channel_id::ChannelId;
pub(crate) mod onion_utils;
mod outbound_payment;
assert!(nodes[1].chain_monitor.chain_monitor.get_and_clear_pending_events().is_empty());
let spendable_output_events = nodes[0].chain_monitor.chain_monitor.get_and_clear_pending_events();
assert_eq!(spendable_output_events.len(), 2);
- for (idx, event) in spendable_output_events.iter().enumerate() {
+ for event in spendable_output_events.iter() {
if let Event::SpendableOutputs { outputs, channel_id } = event {
assert_eq!(outputs.len(), 1);
assert!(vec![chan_b.2, chan_a.2].contains(&channel_id.unwrap()));
use crate::sign::{EntropySource, SignerProvider};
use crate::chain::transaction::OutPoint;
-use crate::events::{Event, MessageSendEvent, MessageSendEventsProvider, ClosureReason};
+use crate::events::{MessageSendEvent, MessageSendEventsProvider, ClosureReason};
use crate::ln::channelmanager::{self, PaymentSendFailure, PaymentId, RecipientOnionFields, ChannelShutdownState, ChannelDetails};
use crate::routing::router::{PaymentParameters, get_route, RouteParameters};
use crate::ln::msgs;
}
}
-pub(crate) struct TestStore {
+pub struct TestStore {
persisted_bytes: Mutex<HashMap<String, HashMap<String, Vec<u8>>>>,
read_only: bool,
}