pub struct InternalApiState {
pub node_id: String,
pub peers: Arc<RwLock<Vec<PeerInfo>>>,
pub current_challenge: Arc<RwLock<Option<Value>>>,
pub mempool: Option<Arc<Mempool>>,
pub ledger: Arc<RwLock<Ledger>>,
pub tribechain_enabled: bool,
pub internal_mint_secret: Option<String>,
pub peer_store: Option<Arc<PeerStore>>,
}Expand description
State for the internal API, shared across peer communication handlers.
Fields§
§node_id: StringNode ID of this validator (e.g., “validator-1”)
peers: Arc<RwLock<Vec<PeerInfo>>>List of known peers in the network
current_challenge: Arc<RwLock<Option<Value>>>Current challenge being broadcast (if any)
mempool: Option<Arc<Mempool>>Mempool for tribechain transaction gossip
ledger: Arc<RwLock<Ledger>>Ledger for tribechain state queries
tribechain_enabled: boolWhether tribechain is enabled
internal_mint_secret: Option<String>Optional shared secret for mint authorization
peer_store: Option<Arc<PeerStore>>Optional peer store for persisting peers to disk
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for InternalApiState
impl !UnwindSafe for InternalApiState
impl Freeze for InternalApiState
impl Send for InternalApiState
impl Sync for InternalApiState
impl Unpin for InternalApiState
impl UnsafeUnpin for InternalApiState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more