Struct loki::process::AdversaryNodeBuilder
source · pub struct AdversaryNodeBuilder {
alias: String,
temp_dir: Option<TestingDirectory>,
server_enabled: bool,
protocol_version: ProtocolVersion,
genesis_block: Block,
invalid_block0_hash: bool,
}
Fields§
§alias: String
§temp_dir: Option<TestingDirectory>
§server_enabled: bool
§protocol_version: ProtocolVersion
§genesis_block: Block
§invalid_block0_hash: bool
Implementations§
source§impl AdversaryNodeBuilder
impl AdversaryNodeBuilder
sourcepub fn new(genesis_block: Block) -> Self
pub fn new(genesis_block: Block) -> Self
As a limitation of the current implementation, the adversary node is not able to bootstrap from peers and as such always need the full block0 to be able to function properly
pub fn with_alias(self, alias: String) -> Self
pub fn with_temp_dir(self, temp_dir: TestingDirectory) -> Self
pub fn with_server_enabled(self) -> Self
pub fn with_protocol_version(self, protocol_version: ProtocolVersion) -> Self
pub fn with_invalid_block0_hash(self) -> Self
pub fn build(self) -> AdversaryNode
Auto Trait Implementations§
impl RefUnwindSafe for AdversaryNodeBuilder
impl Send for AdversaryNodeBuilder
impl Sync for AdversaryNodeBuilder
impl Unpin for AdversaryNodeBuilder
impl UnwindSafe for AdversaryNodeBuilder
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request