pub struct VirtualState {
pub parents: Vec<Hash>,
pub ghostdag_data: GhostdagData,
pub daa_score: u64,
pub bits: u32,
pub past_median_time: u64,
pub multiset: MuHash,
pub utxo_diff: UtxoDiff,
pub accepted_tx_ids: Vec<TransactionId>,
pub mergeset_rewards: BlockHashMap<BlockRewardData>,
pub mergeset_non_daa: BlockHashSet,
}Fields§
§parents: Vec<Hash>§ghostdag_data: GhostdagData§daa_score: u64§bits: u32§past_median_time: u64§multiset: MuHash§utxo_diff: UtxoDiff§accepted_tx_ids: Vec<TransactionId>§mergeset_rewards: BlockHashMap<BlockRewardData>§mergeset_non_daa: BlockHashSetImplementations§
Source§impl VirtualState
impl VirtualState
pub fn new( parents: Vec<Hash>, daa_score: u64, bits: u32, past_median_time: u64, multiset: MuHash, utxo_diff: UtxoDiff, accepted_tx_ids: Vec<TransactionId>, mergeset_rewards: BlockHashMap<BlockRewardData>, mergeset_non_daa: BlockHashSet, ghostdag_data: GhostdagData, ) -> Self
pub fn from_genesis(genesis: &GenesisBlock, ghostdag_data: GhostdagData) -> Self
pub fn to_virtual_state_approx_id(&self) -> VirtualStateApproxId
Trait Implementations§
Source§impl Clone for VirtualState
impl Clone for VirtualState
Source§fn clone(&self) -> VirtualState
fn clone(&self) -> VirtualState
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for VirtualState
impl Default for VirtualState
Source§fn default() -> VirtualState
fn default() -> VirtualState
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for VirtualState
impl<'de> Deserialize<'de> for VirtualState
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&VirtualState> for VirtualStateStats
impl From<&VirtualState> for VirtualStateStats
Source§fn from(state: &VirtualState) -> Self
fn from(state: &VirtualState) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for VirtualState
impl RefUnwindSafe for VirtualState
impl Send for VirtualState
impl Sync for VirtualState
impl Unpin for VirtualState
impl UnwindSafe for VirtualState
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<S> CastArc for Swhere
S: CastFromSync + ?Sized,
impl<S> CastArc for Swhere
S: CastFromSync + ?Sized,
Source§impl<T> CastFrom for Twhere
T: Any + 'static,
impl<T> CastFrom for Twhere
T: Any + 'static,
Source§fn ref_any(&self) -> &(dyn Any + 'static)
fn ref_any(&self) -> &(dyn Any + 'static)
Returns a immutable reference to
Any, which is backed by the type implementing this trait.Source§fn mut_any(&mut self) -> &mut (dyn Any + 'static)
fn mut_any(&mut self) -> &mut (dyn Any + 'static)
Returns a mutable reference to
Any, which is backed by the type implementing this trait.Source§impl<T> CastFromSync for T
impl<T> CastFromSync for T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)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> ⓘ
Converts
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> ⓘ
Converts
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