pub struct RpcState {
pub validator_id: u64,
pub mempool: Arc<Mempool>,
pub status_rx: Receiver<(u64, u64, u64, usize)>,
pub store: Arc<RwLock<Box<dyn BlockStore>>>,
pub peer_info_rx: Receiver<Vec<PeerStatus>>,
}Expand description
Shared state accessible by the RPC server
Fields§
§validator_id: u64§mempool: Arc<Mempool>§status_rx: Receiver<(u64, u64, u64, usize)>(current_view, last_committed_height, epoch, validator_count)
store: Arc<RwLock<Box<dyn BlockStore>>>Shared block store for block queries
peer_info_rx: Receiver<Vec<PeerStatus>>Peer info channel
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