mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-14 18:32:42 +00:00
Implement initial pubsub message handling
This commit is contained in:
@@ -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