#[repr(C)]
pub struct NodeData { pub consensus_branch_id: u32, pub subtree_commitment: [u8; 32], pub start_time: u32, pub end_time: u32, pub start_target: u32, pub end_target: u32, pub start_sapling_root: [u8; 32], pub end_sapling_root: [u8; 32], pub subtree_total_work: U256, pub start_height: u64, pub end_height: u64, pub sapling_tx: u64, }
Expand description

V1 node metadata.

Fields

consensus_branch_id: u32

Consensus branch id, should be provided by deserializing node.

subtree_commitment: [u8; 32]

Subtree commitment - either block hash for leaves or hashsum of children for nodes.

start_time: u32

Start time.

end_time: u32

End time.

start_target: u32

Start target.

end_target: u32

End target.

start_sapling_root: [u8; 32]

Start sapling tree root.

end_sapling_root: [u8; 32]

End sapling tree root.

subtree_total_work: U256

Part of tree total work.

start_height: u64

Start height.

end_height: u64

End height

sapling_tx: u64

Number of Sapling transactions.

Implementations

Combine two nodes metadata.

Write to the byte representation.

Read from the byte representation.

Convert to byte representation.

Convert from byte representation.

Hash node metadata

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.