]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Allow cloning NetworkGraphs
authorMatt Corallo <git@bluematt.me>
Mon, 22 Feb 2021 16:17:05 +0000 (11:17 -0500)
committerMatt Corallo <git@bluematt.me>
Mon, 22 Feb 2021 16:44:22 +0000 (11:44 -0500)
lightning/src/routing/network_graph.rs

index ab32493351bd75d6970e8eb32b60d9b281d6965b..d9a1d8279dea23fa21acbe8d91956d5a962c52fe 100644 (file)
@@ -45,7 +45,7 @@ use bitcoin::hashes::hex::ToHex;
 const MAX_EXCESS_BYTES_FOR_RELAY: usize = 1024;
 
 /// Represents the network as nodes and channels between them
-#[derive(PartialEq)]
+#[derive(Clone, PartialEq)]
 pub struct NetworkGraph {
        genesis_hash: BlockHash,
        channels: BTreeMap<u64, ChannelInfo>,