pub struct SetTarget<'decoder> {
pub channel_id: u32,
pub maximum_target: U256<'decoder>,
}Expand description
Message used by upstream to control the downstream submission rate by adjusting the difficulty target on a specified channel.
All submits leading to hashes higher than the specified target are expected to be rejected by the upstream.
SetTarget::maximum_target is valid until the next SetTarget message is sent and is
applicable for all jobs received on the channel in the future or already received with flag
future_job=true.
When this message is sent to a group channel, the maximum target is applicable to all channels in the group.
Fields§
§channel_id: u32Channel identifier.
maximum_target: U256<'decoder>Maximum value of produced hash that will be accepted by a upstream to accept shares.
Implementations§
Trait Implementations§
Source§impl<'decoder> Decodable<'decoder> for SetTarget<'decoder>
impl<'decoder> Decodable<'decoder> for SetTarget<'decoder>
Source§fn get_structure(data: &[u8]) -> Result<Vec<FieldMarker>, Error>
fn get_structure(data: &[u8]) -> Result<Vec<FieldMarker>, Error>
Defines the expected structure of a type based on binary data. Read more
Source§fn from_decoded_fields(
data: Vec<DecodableField<'decoder>>,
) -> Result<Self, Error>
fn from_decoded_fields( data: Vec<DecodableField<'decoder>>, ) -> Result<Self, Error>
Constructs the type from a vector of decoded fields. Read more
Source§impl<'decoder> From<SetTarget<'decoder>> for EncodableField<'decoder>
impl<'decoder> From<SetTarget<'decoder>> for EncodableField<'decoder>
Auto Trait Implementations§
impl<'decoder> Freeze for SetTarget<'decoder>
impl<'decoder> RefUnwindSafe for SetTarget<'decoder>
impl<'decoder> Send for SetTarget<'decoder>
impl<'decoder> Sync for SetTarget<'decoder>
impl<'decoder> Unpin for SetTarget<'decoder>
impl<'decoder> !UnwindSafe for SetTarget<'decoder>
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