Pass + Doc

This commit is contained in:
mr
2026-02-24 14:31:37 +01:00
parent 572da29fd4
commit 779e36aaef
40 changed files with 1875 additions and 353 deletions

View File

@@ -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)