RPC methods get pubsub topics from chain spec

This commit is contained in:
Age Manning
2019-04-03 13:50:11 +11:00
parent 4e24c8e651
commit a31d6bcb22
3 changed files with 9 additions and 5 deletions

View File

@@ -136,8 +136,11 @@ impl<T: BeaconChainTypes> AttestationService for AttestationServiceInstance<T> {
"type" => "valid_attestation",
);
// get the network topic to send on
let topic_string = self.chain.get_spec().shard_topic_prefix.clone();
// valid attestation, propagate to the network
let topic = types::TopicBuilder::new("attestations".to_string()).build();
let topic = types::TopicBuilder::new(topic_string).build();
let message = PubsubMessage::Attestation(attestation);
self.network_chan