reth_rpc_api::servers

Trait MinerApiServer

Source
pub trait MinerApiServer:
    Sized
    + Send
    + Sync
    + 'static {
    // Required methods
    fn set_extra(&self, record: Bytes) -> RpcResult<bool>;
    fn set_gas_price(&self, gas_price: U128) -> RpcResult<bool>;
    fn set_gas_limit(&self, gas_price: U128) -> RpcResult<bool>;

    // Provided method
    fn into_rpc(self) -> RpcModule<Self> { ... }
}
Expand description

Server trait implementation for the MinerApi RPC API.

Required Methods§

Source

fn set_extra(&self, record: Bytes) -> RpcResult<bool>

Sets the extra data string that is included when this miner mines a block.

Returns an error if the extra data is too long.

Source

fn set_gas_price(&self, gas_price: U128) -> RpcResult<bool>

Sets the minimum accepted gas price for the miner.

Source

fn set_gas_limit(&self, gas_price: U128) -> RpcResult<bool>

Sets the gaslimit to target towards during mining.

Provided Methods§

Source

fn into_rpc(self) -> RpcModule<Self>

Collects all the methods and subscriptions defined in the trait and adds them into a single RpcModule.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§