@@ -216,7 +216,7 @@ func (p *Protocol) onBlock(blockData []byte, id peer.ID) {
216
216
217
217
func (p * Protocol ) onBlockRequest (idBytes []byte , id peer.ID ) {
218
218
if len (idBytes ) != iotago .BlockIDLength {
219
- p .Events .Error .Trigger (ierrors .Errorf ("failed to deserialize block request: invalid block id length" ), id )
219
+ p .Events .Error .Trigger (ierrors .New ("failed to deserialize block request: invalid block id length" ), id )
220
220
221
221
return
222
222
}
@@ -237,7 +237,7 @@ func (p *Protocol) onSlotCommitment(commitmentBytes []byte, id peer.ID) {
237
237
238
238
func (p * Protocol ) onSlotCommitmentRequest (idBytes []byte , id peer.ID ) {
239
239
if len (idBytes ) != iotago .CommitmentIDLength {
240
- p .Events .Error .Trigger (ierrors .Errorf ("failed to deserialize slot commitment request: invalid commitment id length" ), id )
240
+ p .Events .Error .Trigger (ierrors .New ("failed to deserialize slot commitment request: invalid commitment id length" ), id )
241
241
242
242
return
243
243
}
@@ -257,7 +257,7 @@ func (p *Protocol) onAttestations(commitmentBytes []byte, attestationsBytes []by
257
257
258
258
attestationsCount , err := stream .PeekSize (reader , serializer .SeriLengthPrefixTypeAsUint32 )
259
259
if err != nil {
260
- p .Events .Error .Trigger (ierrors .Errorf ("failed peek attestations count" ), id )
260
+ p .Events .Error .Trigger (ierrors .New ("failed peek attestations count" ), id )
261
261
262
262
return
263
263
}
@@ -294,7 +294,7 @@ func (p *Protocol) onAttestations(commitmentBytes []byte, attestationsBytes []by
294
294
295
295
func (p * Protocol ) onAttestationsRequest (commitmentIDBytes []byte , id peer.ID ) {
296
296
if len (commitmentIDBytes ) != iotago .CommitmentIDLength {
297
- p .Events .Error .Trigger (ierrors .Errorf ("failed to deserialize commitmentID in attestations request: invalid commitment id length" ), id )
297
+ p .Events .Error .Trigger (ierrors .New ("failed to deserialize commitmentID in attestations request: invalid commitment id length" ), id )
298
298
299
299
return
300
300
}
0 commit comments