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>
impl<'decoder> SubmitSolution<'decoder>
pub fn into_static(self) -> SubmitSolution<'static>
source§impl<'decoder> SubmitSolution<'decoder>
impl<'decoder> SubmitSolution<'decoder>
pub fn as_static(&self) -> SubmitSolution<'static>
Trait Implementations§
source§impl<'decoder> Clone for SubmitSolution<'decoder>
impl<'decoder> Clone for SubmitSolution<'decoder>
source§fn clone(&self) -> SubmitSolution<'decoder>
fn clone(&self) -> SubmitSolution<'decoder>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl<'decoder> Debug for SubmitSolution<'decoder>
impl<'decoder> Debug for SubmitSolution<'decoder>
source§impl<'decoder> Decodable<'decoder> for SubmitSolution<'decoder>
impl<'decoder> Decodable<'decoder> for SubmitSolution<'decoder>
fn get_structure(data: &[u8]) -> Result<Vec<FieldMarker>, Error>
fn from_decoded_fields( data: Vec<DecodableField<'decoder>> ) -> Result<Self, Error>
fn from_bytes(data: &'a mut [u8]) -> Result<Self, Error>
source§impl<'a> From<SubmitSolution<'a>> for CSubmitSolution
impl<'a> From<SubmitSolution<'a>> for CSubmitSolution
source§fn from(v: SubmitSolution<'a>) -> Self
fn from(v: SubmitSolution<'a>) -> Self
source§impl<'decoder> From<SubmitSolution<'decoder>> for EncodableField<'decoder>
impl<'decoder> From<SubmitSolution<'decoder>> for EncodableField<'decoder>
source§fn from(v: SubmitSolution<'decoder>) -> Self
fn from(v: SubmitSolution<'decoder>) -> Self
source§impl<'decoder> PartialEq for SubmitSolution<'decoder>
impl<'decoder> PartialEq for SubmitSolution<'decoder>
source§fn eq(&self, other: &SubmitSolution<'decoder>) -> bool
fn eq(&self, other: &SubmitSolution<'decoder>) -> bool
self
and other
values to be equal, and is used
by ==
.