mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-17 03:42:46 +00:00
Basic networking service with channel
This commit is contained in:
@@ -2,11 +2,15 @@ use libp2p::PeerId;
|
||||
use types::{Hash256, Slot};
|
||||
|
||||
/// Messages between nodes across the network.
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum NodeMessage {
|
||||
Status(Status),
|
||||
BlockRequest,
|
||||
// TODO: only for testing - remove
|
||||
Message(String),
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Status {
|
||||
/// Current node version.
|
||||
version: u8,
|
||||
@@ -19,6 +23,7 @@ pub struct Status {
|
||||
}
|
||||
|
||||
/// Types of messages that the network service can receive.
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum NetworkMessage {
|
||||
/// Send a message to libp2p service.
|
||||
//TODO: Define typing for messages across the wire
|
||||
|
||||
Reference in New Issue
Block a user