mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-18 04:13:00 +00:00
Add network channel into message handler
This commit is contained in:
@@ -2,7 +2,10 @@ use libp2p::PeerId;
|
||||
use libp2p::{HelloMessage, RPCEvent};
|
||||
use types::{Hash256, Slot};
|
||||
|
||||
//TODO: This module can be entirely replaced in the RPC rewrite
|
||||
|
||||
/// Messages between nodes across the network.
|
||||
//TODO: Remove this in the RPC rewrite
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum NodeMessage {
|
||||
RPC(RPCEvent),
|
||||
@@ -10,11 +13,3 @@ pub enum NodeMessage {
|
||||
// TODO: only for testing - remove
|
||||
Message(String),
|
||||
}
|
||||
|
||||
/// 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
|
||||
Send(PeerId, NodeMessage),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user