forked from cerc-io/plugeth
eth: when snap is complaining for missing eth, be verbose about the details (#28249)
* eth: when snap is complaining for missing eth, be verbost about the details * eth: lower snapshot registration error verbosity
This commit is contained in:
parent
a8a9c8e4b0
commit
95b0555c84
@ -462,7 +462,7 @@ func (h *handler) runSnapExtension(peer *snap.Peer, handler snap.Handler) error
|
|||||||
snap.EgressRegistrationErrorMeter.Mark(1)
|
snap.EgressRegistrationErrorMeter.Mark(1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
peer.Log().Warn("Snapshot extension registration failed", "err", err)
|
peer.Log().Debug("Snapshot extension registration failed", "err", err)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
return handler(peer)
|
return handler(peer)
|
||||||
|
@ -18,6 +18,7 @@ package eth
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
|
"fmt"
|
||||||
"math/big"
|
"math/big"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
@ -74,7 +75,7 @@ func (ps *peerSet) registerSnapExtension(peer *snap.Peer) error {
|
|||||||
// Reject the peer if it advertises `snap` without `eth` as `snap` is only a
|
// Reject the peer if it advertises `snap` without `eth` as `snap` is only a
|
||||||
// satellite protocol meaningful with the chain selection of `eth`
|
// satellite protocol meaningful with the chain selection of `eth`
|
||||||
if !peer.RunningCap(eth.ProtocolName, eth.ProtocolVersions) {
|
if !peer.RunningCap(eth.ProtocolName, eth.ProtocolVersions) {
|
||||||
return errSnapWithoutEth
|
return fmt.Errorf("%w: have %v", errSnapWithoutEth, peer.Caps())
|
||||||
}
|
}
|
||||||
// Ensure nobody can double connect
|
// Ensure nobody can double connect
|
||||||
ps.lock.Lock()
|
ps.lock.Lock()
|
||||||
|
Loading…
Reference in New Issue
Block a user