[−][src]Struct hycon_rust::common::header::Header
Fields
merkle_root: Vec<u8>time_stamp: u64difficulty: f64state_root: Vec<u8>previous_hash: Vec<Vec<u8>>nonce: u64miner: AddressMethods
impl Header[src]
pub fn new(
merkle_root: Vec<u8>,
time_stamp: u64,
difficulty: f64,
state_root: Vec<u8>,
previous_hash: Vec<Vec<u8>>,
nonce: u64,
miner: Address
) -> Header[src]
merkle_root: Vec<u8>,
time_stamp: u64,
difficulty: f64,
state_root: Vec<u8>,
previous_hash: Vec<Vec<u8>>,
nonce: u64,
miner: Address
) -> Header
pub fn prehash(&self) -> Result<Vec<u8>, Box<dyn Error>>[src]
Trait Implementations
impl HeaderProcessor<Header> for Consensus[src]
type UncleProcessResult = UncleResult
User defined type to contain the result of processing uncle blocks Read more
fn process_header(&self, header: &Header) -> Result<(), Box<dyn Error>>[src]
fn process_uncles(
&self,
uncle_hashes: &[Vec<u8>]
) -> Result<UncleResult, Box<dyn Error>>[src]
&self,
uncle_hashes: &[Vec<u8>]
) -> Result<UncleResult, Box<dyn Error>>
impl HyconConsensus<Header, Block<Header, SignedTx>> for Consensus[src]
fn init(&mut self) -> Result<(), Box<dyn Error>>[src]
fn get_header_tip_height(&self) -> Result<u32, Box<dyn Error>>[src]
fn get_block_tip_height(&self) -> Result<u32, Box<dyn Error>>[src]
fn get_block_tip_total_work(&self) -> Result<f64, Box<dyn Error>>[src]
fn get_header_tip_total_work(&self) -> Result<f64, Box<dyn Error>>[src]
fn get_tip_hash(&self) -> Result<Vec<u8>, Box<dyn Error>>[src]
fn put(
&mut self,
_header: Header,
_block: Option<Block<Header, SignedTx>>
) -> Result<(), Box<dyn Error>>[src]
&mut self,
_header: Header,
_block: Option<Block<Header, SignedTx>>
) -> Result<(), Box<dyn Error>>
fn check_hash_at_height(
&self,
hash: &Vec<u8>,
height: u32
) -> Result<BlockStatus, Box<dyn Error>>[src]
&self,
hash: &Vec<u8>,
height: u32
) -> Result<BlockStatus, Box<dyn Error>>
impl BlockHeader for Header[src]
fn get_merkle_root(&self) -> &Vec<u8>[src]
fn get_time_stamp(&self) -> u64[src]
fn get_difficulty(&self) -> f64[src]
fn get_state_root(&self) -> &Vec<u8>[src]
fn get_previous_hash(&self) -> Option<&Vec<Vec<u8>>>[src]
fn get_nonce(&self) -> Option<u64>[src]
fn get_miner(&self) -> Option<&Address>[src]
impl Encode for Header[src]
impl Proto for Header[src]
type ProtoType = ProtoBlockHeader
fn to_proto(&self) -> Result<Self::ProtoType, Box<dyn Error>>[src]
fn from_proto(prototype: &Self::ProtoType) -> Result<Self, Box<dyn Error>>[src]
impl Clone for Header[src]
fn clone(&self) -> Header[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl PartialEq<Header> for Header[src]
impl Debug for Header[src]
Auto Trait Implementations
Blanket Implementations
impl<T> From for T[src]
impl<T, U> Into for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T> Borrow for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> SendSyncUnwindSafe for T where
T: Send + Sync + UnwindSafe + ?Sized,
T: Send + Sync + UnwindSafe + ?Sized,
impl<T> Erased for T
impl<T> Same for T
type Output = T
Should always be Self