node: improve seeds information

Previously, the seeds information would only consist of the connected
NodeIds.

Improve on this by adding any disconnected and fetching seeds as
well. A seed can either be disconnected, connected, or fetching --
where fetching implies connected.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
This commit is contained in:
Fintan Halpenny
2023-02-27 17:48:11 +01:00
committed by Alexis Sellier
parent c0b92d25fb
commit c70dc71b18
7 changed files with 121 additions and 25 deletions
+2 -2
View File
@@ -4,7 +4,7 @@ use std::sync::{Arc, Mutex};
use crossbeam_channel as chan;
use crate::identity::Id;
use crate::node::FetchResult;
use crate::node::{FetchResult, Seeds};
use crate::runtime::HandleError;
use crate::service;
use crate::service::NodeId;
@@ -29,7 +29,7 @@ impl radicle::node::Handle for Handle {
unimplemented!();
}
fn seeds(&mut self, _id: Id) -> Result<Vec<NodeId>, Self::Error> {
fn seeds(&mut self, _id: Id) -> Result<Seeds, Self::Error> {
unimplemented!();
}