Struct ethers_core::utils::GethInstance
source · pub struct GethInstance { /* private fields */ }
Expand description
A geth instance. Will close the instance when dropped.
Construct this using Geth
Implementations§
source§impl GethInstance
impl GethInstance
sourcepub fn ws_endpoint(&self) -> String
pub fn ws_endpoint(&self) -> String
Returns the Websocket endpoint of this instance
sourcepub fn genesis(&self) -> &Option<Genesis>
pub fn genesis(&self) -> &Option<Genesis>
Returns the genesis configuration used to conifugre this instance
sourcepub fn clique_private_key(&self) -> &Option<SigningKey>
pub fn clique_private_key(&self) -> &Option<SigningKey>
Returns the private key used to configure clique on this instance
sourcepub fn stderr(&mut self) -> Result<ChildStderr, GethInstanceError>
pub fn stderr(&mut self) -> Result<ChildStderr, GethInstanceError>
Takes the stderr contained in the child process.
This leaves a None
in its place, so calling methods that require a stderr to be present
will fail if called after this.
sourcepub fn wait_to_add_peer(&mut self, id: H256) -> Result<(), GethInstanceError>
pub fn wait_to_add_peer(&mut self, id: H256) -> Result<(), GethInstanceError>
Blocks until geth adds the specified peer, using 20s as the timeout.
Requires the stderr to be present in the GethInstance
.