diff options
Diffstat (limited to 'swarm/pss/pss.go')
-rw-r--r-- | swarm/pss/pss.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/swarm/pss/pss.go b/swarm/pss/pss.go index b96649fea..e1e24e1f5 100644 --- a/swarm/pss/pss.go +++ b/swarm/pss/pss.go @@ -30,7 +30,7 @@ import ( "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/metrics" "github.com/ethereum/go-ethereum/p2p" - "github.com/ethereum/go-ethereum/p2p/discover" + "github.com/ethereum/go-ethereum/p2p/enode" "github.com/ethereum/go-ethereum/p2p/protocols" "github.com/ethereum/go-ethereum/rpc" "github.com/ethereum/go-ethereum/swarm/log" @@ -70,7 +70,7 @@ type pssCacheEntry struct { // abstraction to enable access to p2p.protocols.Peer.Send type senderPeer interface { Info() *p2p.PeerInfo - ID() discover.NodeID + ID() enode.ID Address() []byte Send(context.Context, interface{}) error } @@ -430,8 +430,7 @@ func (p *Pss) process(pssmsg *PssMsg) error { func (p *Pss) executeHandlers(topic Topic, payload []byte, from *PssAddress, asymmetric bool, keyid string) { handlers := p.getHandlers(topic) - nid, _ := discover.HexID("0x00") // this hack is needed to satisfy the p2p method - peer := p2p.NewPeer(nid, fmt.Sprintf("%x", from), []p2p.Cap{}) + peer := p2p.NewPeer(enode.ID{}, fmt.Sprintf("%x", from), []p2p.Cap{}) for f := range handlers { err := (*f)(payload, peer, asymmetric, keyid) if err != nil { |