Change log levels of gossipsub events
This commit is contained in:
parent
c6fc4f0769
commit
c596e3f7d7
@ -12,7 +12,7 @@ use libp2p::{
|
|||||||
tokio_io::{AsyncRead, AsyncWrite},
|
tokio_io::{AsyncRead, AsyncWrite},
|
||||||
NetworkBehaviour, PeerId,
|
NetworkBehaviour, PeerId,
|
||||||
};
|
};
|
||||||
use slog::{debug, o, warn};
|
use slog::{debug, o, trace, warn};
|
||||||
use ssz::{ssz_encode, Decodable, DecodeError, Encodable, SszStream};
|
use ssz::{ssz_encode, Decodable, DecodeError, Encodable, SszStream};
|
||||||
use types::{Attestation, BeaconBlock};
|
use types::{Attestation, BeaconBlock};
|
||||||
use types::{Topic, TopicHash};
|
use types::{Topic, TopicHash};
|
||||||
@ -47,7 +47,7 @@ impl<TSubstream: AsyncRead + AsyncWrite> NetworkBehaviourEventProcess<GossipsubE
|
|||||||
fn inject_event(&mut self, event: GossipsubEvent) {
|
fn inject_event(&mut self, event: GossipsubEvent) {
|
||||||
match event {
|
match event {
|
||||||
GossipsubEvent::Message(gs_msg) => {
|
GossipsubEvent::Message(gs_msg) => {
|
||||||
debug!(self.log, "Received GossipEvent"; "msg" => format!("{:?}", gs_msg));
|
trace!(self.log, "Received GossipEvent"; "msg" => format!("{:?}", gs_msg));
|
||||||
|
|
||||||
let pubsub_message = match PubsubMessage::ssz_decode(&gs_msg.data, 0) {
|
let pubsub_message = match PubsubMessage::ssz_decode(&gs_msg.data, 0) {
|
||||||
//TODO: Punish peer on error
|
//TODO: Punish peer on error
|
||||||
|
@ -113,7 +113,7 @@ impl Stream for Service {
|
|||||||
topics,
|
topics,
|
||||||
message,
|
message,
|
||||||
} => {
|
} => {
|
||||||
debug!(self.log, "Pubsub message received: {:?}", message);
|
trace!(self.log, "Pubsub message received: {:?}", message);
|
||||||
return Ok(Async::Ready(Some(Libp2pEvent::PubsubMessage {
|
return Ok(Async::Ready(Some(Libp2pEvent::PubsubMessage {
|
||||||
source,
|
source,
|
||||||
topics,
|
topics,
|
||||||
|
Loading…
Reference in New Issue
Block a user