pub struct RpcState {
pub validator_id: u64,
pub mempool: Arc<Mempool>,
pub status_rx: Receiver<ConsensusStatus>,
pub store: Arc<RwLock<Box<dyn BlockStore>>>,
pub peer_info_rx: Receiver<Vec<PeerStatus>>,
pub validator_set_rx: Receiver<Vec<ValidatorInfoResponse>>,
pub app: Option<Arc<dyn Application>>,
}Expand description
Shared state accessible by the RPC server
Fields§
§validator_id: u64§mempool: Arc<Mempool>§status_rx: Receiver<ConsensusStatus>§store: Arc<RwLock<Box<dyn BlockStore>>>Shared block store for block queries
peer_info_rx: Receiver<Vec<PeerStatus>>Peer info channel
validator_set_rx: Receiver<Vec<ValidatorInfoResponse>>Live validator set for get_validators
app: Option<Arc<dyn Application>>Application reference for tx validation (optional for backward compatibility).
Auto Trait Implementations§
impl Freeze for RpcState
impl !RefUnwindSafe for RpcState
impl Send for RpcState
impl Sync for RpcState
impl Unpin for RpcState
impl UnsafeUnpin for RpcState
impl !UnwindSafe for RpcState
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