mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-03 00:31:50 +00:00
Implement initial pubsub message handling
This commit is contained in:
@@ -7,6 +7,7 @@ edition = "2018"
|
||||
[dependencies]
|
||||
bls = { path = "../../eth2/utils/bls" }
|
||||
beacon_chain = { path = "../beacon_chain" }
|
||||
network = { path = "../network" }
|
||||
version = { path = "../version" }
|
||||
types = { path = "../../eth2/types" }
|
||||
ssz = { path = "../../eth2/utils/ssz" }
|
||||
@@ -23,3 +24,4 @@ slog-term = "^2.4.0"
|
||||
slog-async = "^2.3.0"
|
||||
tokio = "0.1.17"
|
||||
exit-future = "0.1.4"
|
||||
crossbeam-channel = "0.3.8"
|
||||
|
||||
@@ -6,6 +6,8 @@ use protos::services::{
|
||||
};
|
||||
use protos::services_grpc::BeaconBlockService;
|
||||
use slog::Logger;
|
||||
use crossbeam_channel;
|
||||
use network::NetworkMessage;
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct BeaconBlockServiceInstance {
|
||||
@@ -48,8 +50,8 @@ impl BeaconBlockService for BeaconBlockServiceInstance {
|
||||
println!("publishing {:?}", block);
|
||||
|
||||
|
||||
// TODO: Build properly
|
||||
let topic = types::TopicBuilder::
|
||||
// TODO: Obtain from the network properly.
|
||||
let topic = types::TopicBuilder::from("beacon_chain").build();
|
||||
println!("Sending beacon block to gossipsub");
|
||||
network_chan.send(NetworkMessage::Publish(
|
||||
|
||||
|
||||
Reference in New Issue
Block a user