[−]Enum nakamoto_node::Network
Bitcoin peer network.
Variants
Bitcoin Mainnet.
Bitcoin Testnet.
Bitcoin regression test net.
Implementations
impl Network
pub fn port(&self) -> u16
Return the default listen port for the network.
pub fn checkpoints(
&self
) -> Box<dyn Iterator<Item = (u64, BlockHash)> + 'static, Global>
&self
) -> Box<dyn Iterator<Item = (u64, BlockHash)> + 'static, Global>
Blockchain checkpoints.
pub fn as_str(&self) -> &'static str
Return the short string representation of this network.
pub fn seeds(&self) -> &[&str]
DNS seeds. Used to bootstrap the client's address book.
impl Network
pub fn genesis(&self) -> BlockHeader
Get the genesis block header.
use nakamoto_common::network::Network; let network = Network::Mainnet; let genesis = network.genesis(); assert_eq!(network.genesis_hash(), genesis.block_hash());
pub fn genesis_block(&self) -> Block
Get the genesis block.
pub fn genesis_hash(&self) -> BlockHash
Get the hash of the genesis block of this network.
pub fn params(&self) -> Params
Get the consensus parameters for this network.
pub fn magic(&self) -> u32
Get the network magic number for this network.
Trait Implementations
impl Clone for Network
pub fn clone(&self) -> Network
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for Network
impl Debug for Network
impl Default for Network
Auto Trait Implementations
impl RefUnwindSafe for Network
[src]
impl Send for Network
[src]
impl Sync for Network
[src]
impl Unpin for Network
[src]
impl UnwindSafe for Network
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,