refactor checkpoint

This commit is contained in:
John Smith
2023-04-21 18:49:59 -04:00
parent 7f909a06b9
commit 74168e96be
42 changed files with 1688 additions and 1067 deletions
+1 -7
View File
@@ -25,13 +25,7 @@ impl RouteNode {
pub fn validate(&self, crypto: Crypto) -> Result<(), VeilidAPIError> {
match self {
RouteNode::NodeId(_) => Ok(()),
RouteNode::PeerInfo(pi) => {
let validated_node_ids = pi.validate(crypto)?;
if validated_node_ids.is_empty() {
apibail_generic!("no validated node ids for route node");
}
Ok(())
}
RouteNode::PeerInfo(pi) => pi.validate(crypto),
}
}