Commit Graph

6 Commits

Author SHA1 Message Date
Tobin C. Harding d4e8f49fc3
Move p2p::constants::Network to crate root
The `Network` type is not a p2p construct, it is more general, used
throughout the codebase to define _which_ Bitcoin network we are
operating on.
2023-08-01 16:46:59 +10:00
Tobin C. Harding 0f78943ef0
Move p2p::constants::Magic to p2p module
In preparation for removing the `p2p::constants` module; move the
`p2p::constants::Magic` type to the `p2p` module.
2023-08-01 16:42:05 +10:00
Tobin C. Harding d9d5a4ed4f
Move p2p::constants::ServiceFlags to p2p module
The `ServiceFlags` type is used by the p2p layer. It can live in the
`mod.rs` file of the `p2p` module. Done in preparation for removing the
`p2p::constants` module.

This is a straight code move, the `ServiceFlags` replaces the
current re-export.
2023-08-01 16:36:12 +10:00
Tobin C. Harding 99d8ae1173
Improve rustdocs on PROTOCOL_VERSION 2023-08-01 16:36:12 +10:00
Tobin C. Harding 4330722d62
Move p2p::constants::PROTOCOL_VERSION to p2p module
The `PROTOCOL_VERSION` const is a p2p layer constant. It can live in the
`mod.rs` file of the `p2p` module.

This is a straight code move, the `PROTOCOL_VERSION` replaces the
current re-export.
2023-08-01 16:36:12 +10:00
Tobin C. Harding 1bac1fd518
Rename the network module to p2p
The `network` module deals with data types and logic related to
internetworking bitcoind nodes, this is commonly referred to as the p2p
layer.

Rename the `network` module to `p2p` and fix all the paths.
2023-08-01 16:36:12 +10:00