more refactor

This commit is contained in:
John Smith
2023-02-15 18:18:08 -05:00
parent f11dc8aaac
commit 8f9b9b58d5
18 changed files with 257 additions and 141 deletions
@@ -133,6 +133,15 @@ impl BucketEntryInner {
self.node_ids.best().unwrap()
}
// Crypto kinds
pub fn crypto_kinds(&self) -> Vec<CryptoKind> {
self.node_ids.kinds()
}
pub fn common_crypto_kinds(&self, other: &[CryptoKind]) -> Vec<CryptoKind> {
common_crypto_kinds(&self.node_ids.kinds(), other)
}
// Less is faster
pub fn cmp_fastest(e1: &Self, e2: &Self) -> std::cmp::Ordering {
// Lower latency to the front