chain: add docs about transaction and block hashes.
This commit is contained in:
parent
2a50298b2e
commit
0a1878d9c3
|
|
@ -15,6 +15,9 @@ use super::Header;
|
||||||
/// Technically, this is the (SHA256d) hash of a block *header*, but since the
|
/// Technically, this is the (SHA256d) hash of a block *header*, but since the
|
||||||
/// block header includes the Merkle root of the transaction Merkle tree, it
|
/// block header includes the Merkle root of the transaction Merkle tree, it
|
||||||
/// binds the entire contents of the block and is used to identify entire blocks.
|
/// binds the entire contents of the block and is used to identify entire blocks.
|
||||||
|
///
|
||||||
|
/// Note: Zebra displays transaction and block hashes in their actual byte-order,
|
||||||
|
/// not in reversed byte-order.
|
||||||
#[derive(Copy, Clone, Eq, PartialEq, Hash, Serialize, Deserialize)]
|
#[derive(Copy, Clone, Eq, PartialEq, Hash, Serialize, Deserialize)]
|
||||||
#[cfg_attr(test, derive(Arbitrary))]
|
#[cfg_attr(test, derive(Arbitrary))]
|
||||||
pub struct Hash(pub [u8; 32]);
|
pub struct Hash(pub [u8; 32]);
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,9 @@ use crate::serialization::{sha256d, SerializationError, ZcashSerialize};
|
||||||
use super::Transaction;
|
use super::Transaction;
|
||||||
|
|
||||||
/// A transaction hash.
|
/// A transaction hash.
|
||||||
|
///
|
||||||
|
/// Note: Zebra displays transaction and block hashes in their actual byte-order,
|
||||||
|
/// not in reversed byte-order.
|
||||||
#[derive(Copy, Clone, Eq, PartialEq, Serialize, Deserialize, Hash)]
|
#[derive(Copy, Clone, Eq, PartialEq, Serialize, Deserialize, Hash)]
|
||||||
#[cfg_attr(test, derive(Arbitrary))]
|
#[cfg_attr(test, derive(Arbitrary))]
|
||||||
pub struct Hash(pub [u8; 32]);
|
pub struct Hash(pub [u8; 32]);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue