Merge pull request #3287 from nspcc-dev/additional-networking-debugs

Additional networking debugs
This commit is contained in:
Anna Shaleva 2024-01-12 14:29:18 +05:00 committed by GitHub
commit 2c0c111fd5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1142,8 +1142,11 @@ txloop:
}
}
}
if s.verifyAndPoolTX(tx) == nil {
err := s.verifyAndPoolTX(tx)
if err == nil {
s.broadcastTX(tx, nil)
} else {
s.log.Debug("tx handler", zap.Error(err), zap.String("hash", tx.Hash().StringLE()))
}
s.txInLock.Lock()
delete(s.txInMap, tx.Hash())
@ -1169,7 +1172,10 @@ func (s *Server) handleP2PNotaryRequestCmd(r *payload.P2PNotaryRequest) error {
}
// It's OK for it to fail for various reasons like request already existing
// in the pool.
_ = s.RelayP2PNotaryRequest(r)
err := s.RelayP2PNotaryRequest(r)
if err != nil {
s.log.Debug("p2p notary request", zap.Error(err), zap.String("hash", r.Hash().StringLE()), zap.String("main", r.MainTransaction.Hash().StringLE()))
}
return nil
}