pub struct SubmitSolution<'decoder> {
    pub template_id: u64,
    pub version: u32,
    pub header_timestamp: u32,
    pub header_nonce: u32,
    pub coinbase_tx: B064K<'decoder>,
}
Expand description

§SubmitSolution (Client -> Server)

Upon finding a coinbase transaction/nonce pair which double-SHA256 hashes at or below [crate::SetNewPrevHash.target], the client MUST immediately send this message, and the server MUST then immediately construct the corresponding full block and attempt to propagate it to the Bitcoin network.

Fields§

§template_id: u64

The template_id field as it appeared in NewTemplate.

§version: u32

The version field in the block header. Bits not defined by [BIP320] as additional nonce MUST be the same as they appear in the [NewWork] message, other bits may be set to any value.

§header_timestamp: u32

The nTime field in the block header. This MUST be greater than or equal to the header_timestamp field in the latest crate::SetNewPrevHash message and lower than or equal to that value plus the number of seconds since the receipt of that message.

§header_nonce: u32

The nonce field in the header.

§coinbase_tx: B064K<'decoder>

The full serialized coinbase transaction, meeting all the requirements of the NewWork message, above.

Implementations§

source§

impl<'decoder> SubmitSolution<'decoder>

source

pub fn into_static(self) -> SubmitSolution<'static>

source§

impl<'decoder> SubmitSolution<'decoder>

source

pub fn as_static(&self) -> SubmitSolution<'static>

Trait Implementations§

source§

impl<'decoder> Clone for SubmitSolution<'decoder>

source§

fn clone(&self) -> SubmitSolution<'decoder>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'decoder> Debug for SubmitSolution<'decoder>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'decoder> Decodable<'decoder> for SubmitSolution<'decoder>

source§

fn get_structure(data: &[u8]) -> Result<Vec<FieldMarker>, Error>

source§

fn from_decoded_fields( data: Vec<DecodableField<'decoder>> ) -> Result<Self, Error>

source§

fn from_bytes(data: &'a mut [u8]) -> Result<Self, Error>

source§

impl<'a> From<SubmitSolution<'a>> for CSubmitSolution

source§

fn from(v: SubmitSolution<'a>) -> Self

Converts to this type from the input type.
source§

impl<'decoder> From<SubmitSolution<'decoder>> for EncodableField<'decoder>

source§

fn from(v: SubmitSolution<'decoder>) -> Self

Converts to this type from the input type.
source§

impl<'decoder> GetSize for SubmitSolution<'decoder>

source§

fn get_size(&self) -> usize

source§

impl<'decoder> PartialEq for SubmitSolution<'decoder>

source§

fn eq(&self, other: &SubmitSolution<'decoder>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<'decoder> Eq for SubmitSolution<'decoder>

source§

impl<'decoder> StructuralPartialEq for SubmitSolution<'decoder>

Auto Trait Implementations§

§

impl<'decoder> Freeze for SubmitSolution<'decoder>

§

impl<'decoder> RefUnwindSafe for SubmitSolution<'decoder>

§

impl<'decoder> Send for SubmitSolution<'decoder>

§

impl<'decoder> Sync for SubmitSolution<'decoder>

§

impl<'decoder> Unpin for SubmitSolution<'decoder>

§

impl<'decoder> !UnwindSafe for SubmitSolution<'decoder>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<'a, T> Encodable for T
where T: Into<EncodableField<'a>>,

source§

fn to_bytes(self, dst: &mut [u8]) -> Result<usize, Error>

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.