Add additional derives for a few structs 2021-05-derives
authorMatt Corallo <git@bluematt.me>
Wed, 2 Jun 2021 16:20:31 +0000 (16:20 +0000)
committerMatt Corallo <git@bluematt.me>
Wed, 2 Jun 2021 16:21:00 +0000 (16:21 +0000)
lightning/src/chain/mod.rs
lightning/src/ln/channelmanager.rs

index e4bb66c7e755905058fa7b0f44520046773b5601..8f27e40baeaf1e3b5d43dade8a05da0bb08dfdcb 100644 (file)
@@ -239,6 +239,7 @@ pub trait Filter {
 ///
 /// [`ChannelMonitor`]: channelmonitor::ChannelMonitor
 /// [`ChannelMonitor::block_connected`]: channelmonitor::ChannelMonitor::block_connected
+#[derive(Clone, PartialEq, Hash)]
 pub struct WatchedOutput {
        /// First block where the transaction output may have been spent.
        pub block_hash: Option<BlockHash>,
index c3fe8090ae483b9bf23bed19284ef3593a60f8c8..13a993fd965596dc41e12a387bc178ea31372b35 100644 (file)
@@ -498,6 +498,7 @@ pub struct ChannelManager<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref,
 /// Typically, the block-specific parameters are derived from the best block hash for the network,
 /// as a newly constructed `ChannelManager` will not have created any channels yet. These parameters
 /// are not needed when deserializing a previously constructed `ChannelManager`.
+#[derive(Clone, Copy, PartialEq)]
 pub struct ChainParameters {
        /// The network for determining the `chain_hash` in Lightning messages.
        pub network: Network,
@@ -509,7 +510,7 @@ pub struct ChainParameters {
 }
 
 /// The best known block as identified by its hash and height.
-#[derive(Clone, Copy)]
+#[derive(Clone, Copy, PartialEq)]
 pub struct BestBlock {
        block_hash: BlockHash,
        height: u32,