geth/crates/geth-discovery/src/lib.rs

18 lines
460 B
Rust
Raw Normal View History

2026-05-15 15:08:20 +02:00
use geth_types::NodeId;
use serde::{Deserialize, Serialize};
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
pub struct PeerCard {
pub node: NodeId,
pub endpoints: Vec<String>,
pub signed_by: String,
}
pub trait DiscoveryBackend {
fn candidates(&self) -> Vec<PeerCard>;
}
#[must_use]
pub fn discovery_is_untrusted_note() -> &'static str {
"discovery returns candidate peers only and never grants trust or authorization"
}