mirror of
https://github.com/Cuprate/cuprate.git
synced 2025-03-22 07:09:13 +00:00
* start re-working p2p to work with change monero-wire * start re-working p2p to work with change monero-wire adds back some changes from #22 * change the peer module to use the new API + fix a couple bugs * remove peer set for now * add try_from/from conversion between `Message` and `Request`/`Response` * Allow specifying other parameters in levin-cuprate * add new `LevinCommand` enum and clean up monero-wire message de/encoding * fix issues with merge * start splitting up p2p crate into smaller crates. * add monerod action from serai to test network code * remove tracing in tests
29 lines
724 B
Rust
29 lines
724 B
Rust
pub mod internal_network;
|
|
|
|
pub use internal_network::{InternalMessageRequest, InternalMessageResponse};
|
|
|
|
use monero_wire::messages::CoreSyncData;
|
|
|
|
/// A request to a [`tower::Service`] that handles sync states.
|
|
pub enum CoreSyncDataRequest {
|
|
/// Get our [`CoreSyncData`].
|
|
GetOurs,
|
|
/// Handle an incoming [`CoreSyncData`].
|
|
NewIncoming(CoreSyncData),
|
|
}
|
|
|
|
/// A response from a [`tower::Service`] that handles sync states.
|
|
pub enum CoreSyncDataResponse {
|
|
/// Our [`CoreSyncData`]
|
|
Ours(CoreSyncData),
|
|
/// The incoming [`CoreSyncData`] is ok.
|
|
Ok,
|
|
}
|
|
|
|
/// The direction of a connection.
|
|
pub enum Direction {
|
|
/// An inbound connection.
|
|
Inbound,
|
|
/// An outbound connection.
|
|
Outbound,
|
|
}
|