Move gossip structs into behaviour

This commit is contained in:
Paul Hauner
2019-03-25 18:59:50 +11:00
parent 32a025bdf7
commit 098e63ac32
5 changed files with 25 additions and 20 deletions

View File

@@ -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,
}