use types.BytesToHash to print []byte variables

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2020-06-03 20:10:05 +02:00 committed by Jakub
parent cbaf523b0e
commit 1e3801d105
1 changed files with 3 additions and 3 deletions

View File

@ -138,7 +138,7 @@ func (s *WhisperMailServer) DeliverMail(peerID []byte, req *whisper.Envelope) {
log.Debug( log.Debug(
"[mailserver:DeliverMail] failed to decode request", "[mailserver:DeliverMail] failed to decode request",
"err", err, "err", err,
"peerID", peerID, "peerID", types.BytesToHash(peerID),
"requestID", req.Hash().String(), "requestID", req.Hash().String(),
) )
payload, err = s.decompositeRequest(peerID, req) payload, err = s.decompositeRequest(peerID, req)
@ -147,7 +147,7 @@ func (s *WhisperMailServer) DeliverMail(peerID []byte, req *whisper.Envelope) {
deliveryFailuresCounter.WithLabelValues("validation").Inc() deliveryFailuresCounter.WithLabelValues("validation").Inc()
log.Error( log.Error(
"[mailserver:DeliverMail] request failed validaton", "[mailserver:DeliverMail] request failed validaton",
"peerID", peerID, "peerID", types.BytesToHash(peerID),
"requestID", req.Hash().String(), "requestID", req.Hash().String(),
"err", err, "err", err,
) )
@ -394,7 +394,7 @@ func (s *WakuMailServer) DeliverMail(peerID []byte, req *wakucommon.Envelope) {
deliveryFailuresCounter.WithLabelValues("validation").Inc() deliveryFailuresCounter.WithLabelValues("validation").Inc()
log.Error( log.Error(
"[mailserver:DeliverMail] request failed validaton", "[mailserver:DeliverMail] request failed validaton",
"peerID", peerID, "peerID", types.BytesToHash(peerID),
"requestID", req.Hash().String(), "requestID", req.Hash().String(),
"err", err, "err", err,
) )