diff --git a/pkg/network/protocols/core/protocol.go b/pkg/network/protocols/core/protocol.go index 7f49e88b6..458a62015 100644 --- a/pkg/network/protocols/core/protocol.go +++ b/pkg/network/protocols/core/protocol.go @@ -216,7 +216,7 @@ func (p *Protocol) onBlock(blockData []byte, id peer.ID) { func (p *Protocol) onBlockRequest(idBytes []byte, id peer.ID) { if len(idBytes) != iotago.BlockIDLength { - p.Events.Error.Trigger(ierrors.Errorf("failed to deserialize block request: invalid block id length"), id) + p.Events.Error.Trigger(ierrors.New("failed to deserialize block request: invalid block id length"), id) return } @@ -237,7 +237,7 @@ func (p *Protocol) onSlotCommitment(commitmentBytes []byte, id peer.ID) { func (p *Protocol) onSlotCommitmentRequest(idBytes []byte, id peer.ID) { if len(idBytes) != iotago.CommitmentIDLength { - p.Events.Error.Trigger(ierrors.Errorf("failed to deserialize slot commitment request: invalid commitment id length"), id) + p.Events.Error.Trigger(ierrors.New("failed to deserialize slot commitment request: invalid commitment id length"), id) return } @@ -257,7 +257,7 @@ func (p *Protocol) onAttestations(commitmentBytes []byte, attestationsBytes []by attestationsCount, err := stream.PeekSize(reader, serializer.SeriLengthPrefixTypeAsUint32) if err != nil { - p.Events.Error.Trigger(ierrors.Errorf("failed peek attestations count"), id) + p.Events.Error.Trigger(ierrors.New("failed peek attestations count"), id) return } @@ -294,7 +294,7 @@ func (p *Protocol) onAttestations(commitmentBytes []byte, attestationsBytes []by func (p *Protocol) onAttestationsRequest(commitmentIDBytes []byte, id peer.ID) { if len(commitmentIDBytes) != iotago.CommitmentIDLength { - p.Events.Error.Trigger(ierrors.Errorf("failed to deserialize commitmentID in attestations request: invalid commitment id length"), id) + p.Events.Error.Trigger(ierrors.New("failed to deserialize commitmentID in attestations request: invalid commitment id length"), id) return }