Struct ckb_testkit::connector::Connector [−][src]
pub struct Connector { /* fields omitted */ }
Expand description
Connector is a fake node
Implementations
pub fn send_relay_transaction(
&self,
node: &Node,
relay_protocol: SupportProtocols,
transaction: &TransactionView,
cycles: Cycle
) -> Result<(), String>
pub fn send_relay_transaction_hash(
&self,
node: &Node,
relay_protocol: SupportProtocols,
hashes: Vec<Byte32>
) -> Result<(), String>
pub fn send_identify_message(
&self,
node: &Node,
network_identifier: &str,
client_version: &str,
listening_addresses: Vec<Multiaddr>,
observed_address: Multiaddr
) -> Result<(), String>
pub fn send_discovery_get_nodes(
&self,
node: &Node,
listening_port: Option<u16>,
max_nodes: u32,
self_defined_flag: u32
) -> Result<(), String>
pub fn send_discovery_nodes(
&self,
node: &Node,
active_push: bool,
addresses: Vec<Multiaddr>
) -> Result<(), String>
pub fn recv_timeout(
&self,
timeout: Duration,
node: &Node,
protocol: &SupportProtocols
) -> Result<Bytes, String>
Try to establish connection with node
. This function blocks until all protocols opened.
Send data
through the protocol of the session
Return the session corresponding to the node
if connected.
Return the opened protocols of the session corresponding to the node
if connected
Return the shared state
Auto Trait Implementations
impl !RefUnwindSafe for Connector
impl !UnwindSafe for Connector
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more