Fixed network context

This commit is contained in:
arkpar 2016-12-01 15:48:56 +01:00
parent 344999aaf7
commit 4eca687bbb

View File

@ -260,7 +260,7 @@ impl ChainNotify for EthSync {
} }
fn broadcast(&self, message: Vec<u8>) { fn broadcast(&self, message: Vec<u8>) {
self.network.with_context(ETH_PROTOCOL, |context| { self.network.with_context(WARP_SYNC_PROTOCOL_ID, |context| {
let mut sync_io = NetSyncIo::new(context, &*self.eth_handler.chain, &*self.eth_handler.snapshot_service, &self.eth_handler.overlay); let mut sync_io = NetSyncIo::new(context, &*self.eth_handler.chain, &*self.eth_handler.snapshot_service, &self.eth_handler.overlay);
self.eth_handler.sync.write().propagate_consensus_packet(&mut sync_io, message.clone()); self.eth_handler.sync.write().propagate_consensus_packet(&mut sync_io, message.clone());
}); });