Struct chainhook_types::BitcoinBlockData
source · pub struct BitcoinBlockData {
pub block_identifier: BlockIdentifier,
pub parent_block_identifier: BlockIdentifier,
pub timestamp: u32,
pub transactions: Vec<BitcoinTransactionData>,
pub metadata: BitcoinBlockMetadata,
}Expand description
BitcoinBlock contain an array of Transactions that occurred at a particular BlockIdentifier. A hard requirement for blocks returned by Rosetta implementations is that they MUST be inalterable: once a client has requested and received a block identified by a specific BlockIndentifier, all future calls for that same BlockIdentifier must return the same block contents.
Fields§
§block_identifier: BlockIdentifier§parent_block_identifier: BlockIdentifier§timestamp: u32The timestamp of the block in milliseconds since the Unix Epoch. The timestamp is stored in milliseconds because some blockchains produce blocks more often than once a second.
transactions: Vec<BitcoinTransactionData>§metadata: BitcoinBlockMetadataTrait Implementations§
source§impl Clone for BitcoinBlockData
impl Clone for BitcoinBlockData
source§fn clone(&self) -> BitcoinBlockData
fn clone(&self) -> BitcoinBlockData
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for BitcoinBlockData
impl Debug for BitcoinBlockData
source§impl<'de> Deserialize<'de> for BitcoinBlockData
impl<'de> Deserialize<'de> for BitcoinBlockData
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 PartialEq<BitcoinBlockData> for BitcoinBlockData
impl PartialEq<BitcoinBlockData> for BitcoinBlockData
source§fn eq(&self, other: &BitcoinBlockData) -> bool
fn eq(&self, other: &BitcoinBlockData) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl Serialize for BitcoinBlockData
impl Serialize for BitcoinBlockData
impl StructuralPartialEq for BitcoinBlockData
Auto Trait Implementations§
impl RefUnwindSafe for BitcoinBlockData
impl Send for BitcoinBlockData
impl Sync for BitcoinBlockData
impl Unpin for BitcoinBlockData
impl UnwindSafe for BitcoinBlockData
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more