diff options
author | Janos Guljas <janos@resenje.org> | 2018-09-25 22:57:31 +0800 |
---|---|---|
committer | Janos Guljas <janos@resenje.org> | 2018-09-25 22:57:31 +0800 |
commit | 24349144b6c0642755569268bab56b9033743212 (patch) | |
tree | 9d9d2b6659fd8a56512dfc807aafe4b733165ae1 /swarm/pss/client/client.go | |
parent | 7d56602391e155e2ce9ba7c261300a1804ab9972 (diff) | |
parent | d3441ebb563439bac0837d70591f92e2c6080303 (diff) | |
download | go-tangerine-24349144b6c0642755569268bab56b9033743212.tar go-tangerine-24349144b6c0642755569268bab56b9033743212.tar.gz go-tangerine-24349144b6c0642755569268bab56b9033743212.tar.bz2 go-tangerine-24349144b6c0642755569268bab56b9033743212.tar.lz go-tangerine-24349144b6c0642755569268bab56b9033743212.tar.xz go-tangerine-24349144b6c0642755569268bab56b9033743212.tar.zst go-tangerine-24349144b6c0642755569268bab56b9033743212.zip |
Merge branch 'master' into max-stream-peer-servers
Diffstat (limited to 'swarm/pss/client/client.go')
-rw-r--r-- | swarm/pss/client/client.go | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/swarm/pss/client/client.go b/swarm/pss/client/client.go index 532a22384..d541081d3 100644 --- a/swarm/pss/client/client.go +++ b/swarm/pss/client/client.go @@ -27,7 +27,7 @@ import ( "github.com/ethereum/go-ethereum/common/hexutil" "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/rlp" "github.com/ethereum/go-ethereum/rpc" @@ -283,8 +283,7 @@ func (c *Client) RunProtocol(ctx context.Context, proto *p2p.Protocol) error { break } c.peerPool[topicobj][pubkeyid] = rw - nid, _ := discover.HexID("0x00") - p := p2p.NewPeer(nid, fmt.Sprintf("%v", addr), []p2p.Cap{}) + p := p2p.NewPeer(enode.ID{}, fmt.Sprintf("%v", addr), []p2p.Cap{}) go proto.Run(p, c.peerPool[topicobj][pubkeyid]) } go func() { @@ -334,8 +333,7 @@ func (c *Client) AddPssPeer(pubkeyid string, addr []byte, spec *protocols.Spec) c.poolMu.Lock() c.peerPool[topic][pubkeyid] = rw c.poolMu.Unlock() - nid, _ := discover.HexID("0x00") - p := p2p.NewPeer(nid, fmt.Sprintf("%v", addr), []p2p.Cap{}) + p := p2p.NewPeer(enode.ID{}, fmt.Sprintf("%v", addr), []p2p.Cap{}) go c.protos[topic].Run(p, c.peerPool[topic][pubkeyid]) } return nil |