Skip to content

Commit ca9e010

Browse files
committed
fix: shadow err
1 parent 1db094e commit ca9e010

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

p2p/protocol.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,9 @@ type EthProtocolOptions struct {
8585
ShouldBroadcastBlockHashes bool
8686

8787
// Cache sizes for known tx/block tracking per peer
88-
MaxKnownTxs int
89-
MaxKnownBlocks int
90-
PeerCacheTTL time.Duration
88+
MaxKnownTxs int
89+
MaxKnownBlocks int
90+
PeerCacheTTL time.Duration
9191
}
9292

9393
// HeadBlock contains the necessary head block data for the status message.
@@ -248,8 +248,9 @@ func (c *conn) readStatus(packet *eth.StatusPacket) error {
248248
if err != nil {
249249
return err
250250
}
251+
251252
defer func() {
252-
if err := msg.Discard(); err != nil {
253+
if err = msg.Discard(); err != nil {
253254
c.logger.Error().Err(err).Msg("Failed to discard message")
254255
}
255256
}()

0 commit comments

Comments
 (0)