[−][src]Module monacoin::network::constants
Network constants
This module provides various constants relating to the Bitcoin network protocol, such as protocol versioning and magic header bytes.
The Network
type implements the Decodable
and
Encodable
traits and encodes the magic bytes of the given
network
Example: encoding a network's magic bytes
use monacoin::network::constants::Network; use monacoin::consensus::encode::serialize; let network = Network::Monacoin; let bytes = serialize(&network.magic()); assert_eq!(&bytes[..], &[0xFB, 0xC0, 0xB6, 0xDB]);
Structs
ServiceFlags | Flags to indicate which network services a node supports. |
Enums
Network | The cryptocurrency to act on |
Constants
PROTOCOL_VERSION | Version of the protocol as appearing in network message headers |