eth/protocols/eth,p2p/discover: remove unnecessary checks (#29590)
fix useless condition
This commit is contained in:
parent
2f6ff492ae
commit
a13b92524d
|
@ -190,7 +190,7 @@ func serviceContiguousBlockHeaderQuery(chain *core.BlockChain, query *GetBlockHe
|
|||
return headers
|
||||
}
|
||||
{ // Last mode: deliver ancestors of H
|
||||
for i := uint64(1); header != nil && i < count; i++ {
|
||||
for i := uint64(1); i < count; i++ {
|
||||
header = chain.GetHeaderByHash(header.ParentHash)
|
||||
if header == nil {
|
||||
break
|
||||
|
|
|
@ -548,7 +548,7 @@ func (t *UDPv4) handlePacket(from *net.UDPAddr, buf []byte) error {
|
|||
}
|
||||
packet := t.wrapPacket(rawpacket)
|
||||
fromID := fromKey.ID()
|
||||
if err == nil && packet.preverify != nil {
|
||||
if packet.preverify != nil {
|
||||
err = packet.preverify(packet, from, fromID, fromKey)
|
||||
}
|
||||
t.log.Trace("<< "+packet.Name(), "id", fromID, "addr", from, "err", err)
|
||||
|
|
Loading…
Reference in New Issue