X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Frouting%2Fnetwork_graph.rs;h=13dc662642c62ccd8aabc9affd520a9ad927bb2a;hb=4894d52d30399c21b7994952a8de0d1d7848c58d;hp=d9a1d8279dea23fa21acbe8d91956d5a962c52fe;hpb=793de5fe6944bb6ab414934e53a7ae80bb5a9a31;p=rust-lightning diff --git a/lightning/src/routing/network_graph.rs b/lightning/src/routing/network_graph.rs index d9a1d827..13dc6626 100644 --- a/lightning/src/routing/network_graph.rs +++ b/lightning/src/routing/network_graph.rs @@ -102,6 +102,13 @@ impl NetGraphMsgHandler where C::Target: chain::Access } } + /// Adds a provider used to check new announcements. Does not affect + /// existing announcements unless they are updated. + /// Add, update or remove the provider would replace the current one. + pub fn add_chain_access(&mut self, chain_access: Option) { + self.chain_access = chain_access; + } + /// Take a read lock on the network_graph and return it in the C-bindings /// newtype helper. This is likely only useful when called via the C /// bindings as you can call `self.network_graph.read().unwrap()` in Rust