pub struct MinerClientConfig {
pub rpc_url: String,
pub poll_interval: u64,
pub block_on_submit: bool,
pub listen: Option<SocketAddr>,
pub auth_token: Option<String>,
}Expand description
RPC client config options.
Fields§
§rpc_url: StringCKB node RPC endpoint.
poll_interval: u64The poll interval in seconds to get work from the CKB node.
block_on_submit: boolBy default, miner submits a block and continues to get the next work.
When this is enabled, miner will block until the submission RPC returns.
listen: Option<SocketAddr>listen block_template notify instead of loop poll
auth_token: Option<String>Optional bearer token to authenticate block-template notifications.
When listen is set and this token is configured, incoming notify
requests must include the header Authorization: Bearer <token>.
If listen is set but this token is not configured, ckb-miner will
accept any request that deserializes as a BlockTemplate, which can be
abused if the notify endpoint is reachable by untrusted parties.
Must be non-empty and free of leading/trailing whitespace; ckb-miner refuses to start otherwise.
Trait Implementations§
Source§impl Clone for ClientConfig
impl Clone for ClientConfig
Source§fn clone(&self) -> ClientConfig
fn clone(&self) -> ClientConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ClientConfig
impl Debug for ClientConfig
Source§impl<'de> Deserialize<'de> for ClientConfig
impl<'de> Deserialize<'de> for ClientConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for ClientConfig
Source§impl PartialEq for ClientConfig
impl PartialEq for ClientConfig
Source§impl Serialize for ClientConfig
impl Serialize for ClientConfig
impl StructuralPartialEq for ClientConfig
Auto Trait Implementations§
impl Freeze for ClientConfig
impl RefUnwindSafe for ClientConfig
impl Send for ClientConfig
impl Sync for ClientConfig
impl Unpin for ClientConfig
impl UnsafeUnpin for ClientConfig
impl UnwindSafe for ClientConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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>
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>
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