Reorder struct definitions so that they are in dependency order.
[rust-lightning] / lightning / src / routing / network_graph.rs
index 89c19b84896bdb37c4644322871131461bf8354c..0dafc105bd20a1a531a3ac07b67fbcfe7604d1a9 100644 (file)
@@ -33,6 +33,13 @@ use std::collections::btree_map::Entry as BtreeEntry;
 use std::ops::Deref;
 use bitcoin::hashes::hex::ToHex;
 
+/// Represents the network as nodes and channels between them
+#[derive(PartialEq)]
+pub struct NetworkGraph {
+       channels: BTreeMap<u64, ChannelInfo>,
+       nodes: BTreeMap<PublicKey, NodeInfo>,
+}
+
 /// Receives and validates network updates from peers,
 /// stores authentic and relevant data as a network graph.
 /// This network graph is then used for routing payments.
@@ -443,13 +450,6 @@ impl Readable for NodeInfo {
        }
 }
 
-/// Represents the network as nodes and channels between them
-#[derive(PartialEq)]
-pub struct NetworkGraph {
-       channels: BTreeMap<u64, ChannelInfo>,
-       nodes: BTreeMap<PublicKey, NodeInfo>,
-}
-
 impl Writeable for NetworkGraph {
        fn write<W: Writer>(&self, writer: &mut W) -> Result<(), ::std::io::Error> {
                (self.channels.len() as u64).write(writer)?;