mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
eth: when snap is complaining for missing eth, be verbost about the details
This commit is contained in:
parent
bc6d184872
commit
21a5d079c0
1 changed files with 2 additions and 1 deletions
|
|
@ -18,6 +18,7 @@ package eth
|
|||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"math/big"
|
||||
"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
|
||||
// satellite protocol meaningful with the chain selection of `eth`
|
||||
if !peer.RunningCap(eth.ProtocolName, eth.ProtocolVersions) {
|
||||
return errSnapWithoutEth
|
||||
return fmt.Errorf("%w: have %v", errSnapWithoutEth, peer.Caps())
|
||||
}
|
||||
// Ensure nobody can double connect
|
||||
ps.lock.Lock()
|
||||
|
|
|
|||
Loading…
Reference in a new issue