Skip to content

Commit

Permalink
Fix for NetworkGraph
Browse files Browse the repository at this point in the history
  • Loading branch information
tnull committed Jun 30, 2022
1 parent 79241f2 commit 480887d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lightning-invoice/src/utils.rs
Expand Up @@ -472,13 +472,12 @@ where L::Target: Logger {
fn build_route_from_hops(
&self, payer: &PublicKey, hops: &[PublicKey], params: &RouteParameters
) -> Result<Route, LightningError> {
let network_graph = self.network_graph.read_only();
let random_seed_bytes = {
let mut locked_random_seed_bytes = self.random_seed_bytes.lock().unwrap();
*locked_random_seed_bytes = sha256::Hash::hash(&*locked_random_seed_bytes).into_inner();
*locked_random_seed_bytes
};
build_route_from_hops(payer, hops, params, &network_graph, &*self.logger, &random_seed_bytes)
build_route_from_hops(payer, hops, params, &self.network_graph, &*self.logger, &random_seed_bytes)
}
}

Expand Down

0 comments on commit 480887d

Please sign in to comment.