pub struct Validator<N: Network, C: ConsensusStorage<N>> { /* private fields */ }Expand description
A validator is a full node, capable of validating blocks.
Implementations§
Source§impl<N: Network, C: ConsensusStorage<N>> Validator<N, C>
impl<N: Network, C: ConsensusStorage<N>> Validator<N, C>
Sourcepub async fn new(
rest_ip: SocketAddr,
rest_rps: u32,
account: Account<N>,
genesis: Block<N>,
keep_state: bool,
storage_mode: StorageMode,
tracing: Option<TracingHandler>,
shutdown: Arc<AtomicBool>,
) -> Result<Self>
pub async fn new( rest_ip: SocketAddr, rest_rps: u32, account: Account<N>, genesis: Block<N>, keep_state: bool, storage_mode: StorageMode, tracing: Option<TracingHandler>, shutdown: Arc<AtomicBool>, ) -> Result<Self>
Initializes a new validator node.
Trait Implementations§
Source§impl<N: Network, C: ConsensusStorage<N>> TracingHandlerGuard for Validator<N, C>
impl<N: Network, C: ConsensusStorage<N>> TracingHandlerGuard for Validator<N, C>
Source§fn get_tracing_guard(&self) -> Option<DefaultGuard>
fn get_tracing_guard(&self) -> Option<DefaultGuard>
Retruns tracing guard
Auto Trait Implementations§
impl<N, C> Freeze for Validator<N, C>where
<N as Network>::BlockHash: Freeze,
C: Freeze,
<N as Network>::StateRoot: Freeze,
<N as Environment>::Field: Freeze,
<N as Environment>::Scalar: Freeze,
<N as Environment>::Projective: Freeze,
impl<N, C> !RefUnwindSafe for Validator<N, C>
impl<N, C> Send for Validator<N, C>
impl<N, C> Sync for Validator<N, C>
impl<N, C> Unpin for Validator<N, C>where
<N as Network>::BlockHash: Unpin,
C: Unpin,
<N as Network>::StateRoot: Unpin,
N: Unpin,
<N as Environment>::Field: Unpin,
<N as Environment>::Scalar: Unpin,
<N as Network>::TransactionID: Unpin,
<N as Environment>::Projective: Unpin,
<N as Network>::RatificationID: Unpin,
<N as Network>::TransitionID: Unpin,
<<N as Environment>::PairingCurve as PairingEngine>::G1Affine: Unpin,
impl<N, C> !UnwindSafe for Validator<N, C>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more