mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-26 01:03:40 +00:00
Propagate RPC through network service.
- Basic network message handler threading - Correct references
This commit is contained in:
@@ -1,27 +1,16 @@
|
||||
use libp2p::PeerId;
|
||||
use libp2p::{HelloMessage, RpcEvent};
|
||||
use types::{Hash256, Slot};
|
||||
|
||||
/// Messages between nodes across the network.
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum NodeMessage {
|
||||
Status(Status),
|
||||
RPC(RpcEvent),
|
||||
BlockRequest,
|
||||
// TODO: only for testing - remove
|
||||
Message(String),
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Status {
|
||||
/// Current node version.
|
||||
version: u8,
|
||||
/// Genesis Hash.
|
||||
genesis_hash: Hash256,
|
||||
/// Best known slot number.
|
||||
best_slot: Slot,
|
||||
/// Best known slot hash.
|
||||
best_slot_hash: Hash256,
|
||||
}
|
||||
|
||||
/// Types of messages that the network service can receive.
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum NetworkMessage {
|
||||
|
||||
Reference in New Issue
Block a user