pub struct VersionMessage {
pub version: u32,
pub services: u64,
pub timestamp: i64,
pub receiver: Address,
pub sender: Address,
pub nonce: u64,
pub user_agent: String,
pub start_height: i32,
pub relay: bool,
}
Some simple messages
The version
message
The P2P network protocol version
A bitmask describing the services supported by this node
The time at which the version
message was sent
The network address of the peer receiving the message
The network address of the peer sending the message
A random nonce used to detect loops in the network
A string describing the peer's software
The height of the maxmimum-work blockchain that the peer is aware of
Whether the receiving peer should relay messages to the sender; used
if the sender is bandwidth-limited and would like to support bloom
filtering. Defaults to true.
Constructs a new version
message
Encode an object with a well-defined format, should only ever error if the underlying Encoder errors. Read more
Decode an object with a well-defined format
This method tests for self
and other
values to be equal, and is used by ==
. Read more
This method tests for !=
.
Performs copy-assignment from source
. Read more
Formats the value using the given formatter. Read more
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static