pub struct MonitorUpdateError(pub &'static str);
/// An event to be processed by the ChannelManager.
-#[derive(PartialEq)]
+#[derive(Clone, PartialEq)]
pub enum MonitorEvent {
/// A monitor event containing an HTLCUpdate.
HTLCEvent(HTLCUpdate),
/// in the signer.
/// The pre-calculated keys are an optimization, because ChannelKeys has enough
/// information to re-derive them.
+#[derive(PartialEq, Clone)]
pub struct PreCalculatedTxCreationKeys(TxCreationKeys);
impl PreCalculatedTxCreationKeys {
const CHECK_CLTV_EXPIRY_SANITY_2: u32 = CLTV_EXPIRY_DELTA as u32 - LATENCY_GRACE_PERIOD_BLOCKS - 2*CLTV_CLAIM_BUFFER;
/// Details of a channel, as returned by ChannelManager::list_channels and ChannelManager::list_usable_channels
+#[derive(Clone)]
pub struct ChannelDetails {
/// The channel's ID (prior to funding transaction generation, this is a random 32 bytes,
/// thereafter this is the txid of the funding transaction xor the funding transaction output).
}
/// An init message to be sent or received from a peer
+#[derive(Clone)]
pub struct Init {
#[cfg(not(feature = "fuzztarget"))]
pub(crate) features: InitFeatures,
}
/// A ping message to be sent or received from a peer
+#[derive(Clone)]
pub struct Ping {
/// The desired response length
pub ponglen: u16,
}
/// A pong message to be sent or received from a peer
+#[derive(Clone)]
pub struct Pong {
/// The pong packet size.
/// This field is not sent on the wire. byteslen zeros are sent.
}
/// A channel descriptor which provides a last-hop route to get_route
+#[derive(Clone)]
pub struct RouteHint {
/// The node_id of the non-target end of the route
pub src_node_id: PublicKey,
/// Note that while Writeable and Readable are implemented for Event, you probably shouldn't use
/// them directly as they don't round-trip exactly (for example FundingGenerationReady is never
/// written as it makes no sense to respond to it after reconnecting to peers).
-#[derive(Debug)]
+#[derive(Clone, Debug)]
pub enum Event {
/// Used to indicate that the client should generate a funding transaction with the given
/// parameters and then call ChannelManager::funding_transaction_generated.