mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-15 02:42:38 +00:00
Move gossip structs into behaviour
This commit is contained in:
@@ -97,12 +97,6 @@ impl RPCResponse {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum IncomingGossip {
|
||||
Block(BlockGossip),
|
||||
Attestation(AttestationGossip),
|
||||
}
|
||||
|
||||
/* Request/Response data structures for RPC methods */
|
||||
|
||||
/// The HELLO request/response handshake message.
|
||||
@@ -242,15 +236,3 @@ pub struct BeaconChainStateResponse {
|
||||
/// The values corresponding the to the requested tree hashes.
|
||||
pub values: bool, //TBD - stubbed with encodeable bool
|
||||
}
|
||||
|
||||
/// Gossipsub message providing notification of a new block.
|
||||
#[derive(Encode, Decode, Clone, Debug, PartialEq)]
|
||||
pub struct BlockGossip {
|
||||
pub root: BlockRootSlot,
|
||||
}
|
||||
|
||||
/// Gossipsub message providing notification of a new attestation.
|
||||
#[derive(Encode, Decode, Clone, Debug, PartialEq)]
|
||||
pub struct AttestationGossip {
|
||||
pub attestation: Attestation,
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ use libp2p::core::swarm::{
|
||||
ConnectedPoint, NetworkBehaviour, NetworkBehaviourAction, PollParameters,
|
||||
};
|
||||
use libp2p::{Multiaddr, PeerId};
|
||||
pub use methods::{HelloMessage, IncomingGossip, RPCMethod, RPCRequest, RPCResponse};
|
||||
pub use methods::{HelloMessage, RPCMethod, RPCRequest, RPCResponse};
|
||||
pub use protocol::{RPCEvent, RPCProtocol, RequestId};
|
||||
use slog::o;
|
||||
use std::marker::PhantomData;
|
||||
|
||||
Reference in New Issue
Block a user