Skip to content

Commit

Permalink
simplify error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
diegomrsantos committed Dec 17, 2024
1 parent 2cd0e43 commit afcfe99
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions anchor/network/src/discovery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,13 @@ impl Discovery {
);

let repr = bootnode_enr.to_string();
let _ = discv5.add_enr(bootnode_enr).map_err(|e| {
if let Err(e) = discv5.add_enr(bootnode_enr) {
error!(
addr = repr,
error = e.to_string(),
"Could not add peer to the local routing table"
)
});
};
}

// Start the discv5 service and obtain an event stream
Expand Down

0 comments on commit afcfe99

Please sign in to comment.