pub struct ChainHash(/* private fields */);Expand description
The uniquely identifying hash of the target blockchain.
Implementations§
Source§impl ChainHash
impl ChainHash
Sourcepub fn as_mut_ptr(&mut self) -> *mut u8
pub fn as_mut_ptr(&mut self) -> *mut u8
Converts the object to a mutable raw pointer.
Source§impl ChainHash
impl ChainHash
Sourcepub const TESTNET: Self
👎Deprecated since 0.32.4: Use TESTNET3 instead
pub const TESTNET: Self
ChainHash for testnet3 bitcoin.
Sourcepub fn using_genesis_block(params: impl AsRef<Params>) -> Self
pub fn using_genesis_block(params: impl AsRef<Params>) -> Self
Returns the hash of the network genesis block for use as a chain hash.
See BOLT 0 for specification.
Sourcepub const fn using_genesis_block_const(network: Network) -> Self
pub const fn using_genesis_block_const(network: Network) -> Self
Returns the hash of the network genesis block for use as a chain hash.
See BOLT 0 for specification.
Sourcepub fn from_genesis_block_hash(block_hash: BlockHash) -> Self
pub fn from_genesis_block_hash(block_hash: BlockHash) -> Self
Converts genesis block hash into ChainHash.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ChainHash
impl<'de> Deserialize<'de> for ChainHash
Source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<ChainHash, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<ChainHash, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl Ord for ChainHash
impl Ord for ChainHash
Source§impl PartialOrd for ChainHash
impl PartialOrd for ChainHash
impl Copy for ChainHash
impl Eq for ChainHash
impl StructuralPartialEq for ChainHash
Auto Trait Implementations§
impl Freeze for ChainHash
impl RefUnwindSafe for ChainHash
impl Send for ChainHash
impl Sync for ChainHash
impl Unpin for ChainHash
impl UnwindSafe for ChainHash
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