Pass + Doc
This commit is contained in:
@@ -22,6 +22,7 @@ import (
|
||||
pubsubs "github.com/libp2p/go-libp2p-pubsub"
|
||||
"github.com/libp2p/go-libp2p/core/crypto"
|
||||
pp "github.com/libp2p/go-libp2p/core/peer"
|
||||
"github.com/libp2p/go-libp2p/core/protocol"
|
||||
)
|
||||
|
||||
type Node struct {
|
||||
@@ -128,7 +129,8 @@ func (d *Node) publishPeerRecord(
|
||||
}
|
||||
for _, ad := range common.StaticIndexers {
|
||||
var err error
|
||||
if common.StreamIndexers, err = common.TempStream(d.Host, *ad, common.ProtocolPublish, "", common.StreamIndexers, &common.StreamMuIndexes); err != nil {
|
||||
if common.StreamIndexers, err = common.TempStream(d.Host, *ad, common.ProtocolPublish, "", common.StreamIndexers, map[protocol.ID]*common.ProtocolInfo{},
|
||||
&common.StreamMuIndexes); err != nil {
|
||||
continue
|
||||
}
|
||||
stream := common.StreamIndexers[common.ProtocolPublish][ad.ID]
|
||||
@@ -165,7 +167,7 @@ func (d *Node) GetPeerRecord(
|
||||
var info map[string]indexer.PeerRecord
|
||||
for _, ad := range common.StaticIndexers {
|
||||
if common.StreamIndexers, err = common.TempStream(d.Host, *ad, common.ProtocolGet, "",
|
||||
common.StreamIndexers, &common.StreamMuIndexes); err != nil {
|
||||
common.StreamIndexers, map[protocol.ID]*common.ProtocolInfo{}, &common.StreamMuIndexes); err != nil {
|
||||
continue
|
||||
}
|
||||
pidR, err := pp.Decode(pid)
|
||||
|
||||
Reference in New Issue
Block a user