From 2e31df89c24f8f9fe2110f04024911cbf90b5e9d Mon Sep 17 00:00:00 2001 From: mr Date: Thu, 5 Feb 2026 15:47:29 +0100 Subject: [PATCH] oc-discovery + auto create peer --- daemons/node/common/common_stream.go | 2 +- daemons/node/indexer/handler.go | 2 +- daemons/node/node.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/daemons/node/common/common_stream.go b/daemons/node/common/common_stream.go index 259f624..a8d557b 100644 --- a/daemons/node/common/common_stream.go +++ b/daemons/node/common/common_stream.go @@ -68,7 +68,7 @@ func (ix *LongLivedStreamRecordedService[T]) gc() { } ix.PubsubMu.Lock() if ix.LongLivedPubSubs[TopicPubSubNodeActivity] != nil { - ad, err := pp.AddrInfoFromString("/ip4/" + conf.GetConfig().Hostname + " /tcp/" + fmt.Sprintf("%v", conf.GetConfig().NodeEndpointPort) + "/p2p/" + ix.Host.ID().String()) + ad, err := pp.AddrInfoFromString("/ip4/" + conf.GetConfig().Hostname + "/tcp/" + fmt.Sprintf("%v", conf.GetConfig().NodeEndpointPort) + "/p2p/" + ix.Host.ID().String()) if err == nil { if b, err := json.Marshal(TopicNodeActivityPub{ Disposer: *ad, diff --git a/daemons/node/indexer/handler.go b/daemons/node/indexer/handler.go index e4e2e11..7a1dbba 100644 --- a/daemons/node/indexer/handler.go +++ b/daemons/node/indexer/handler.go @@ -183,7 +183,7 @@ func (ix *IndexerService) handleNodePublish(s network.Stream) { } if ix.LongLivedPubSubs[common.TopicPubSubNodeActivity] != nil && !rec.NoPub { - ad, err := peer.AddrInfoFromString("/ip4/" + conf.GetConfig().Hostname + " /tcp/" + fmt.Sprintf("%v", conf.GetConfig().NodeEndpointPort) + "/p2p/" + ix.Host.ID().String()) + ad, err := peer.AddrInfoFromString("/ip4/" + conf.GetConfig().Hostname + "/tcp/" + fmt.Sprintf("%v", conf.GetConfig().NodeEndpointPort) + "/p2p/" + ix.Host.ID().String()) if err == nil { if b, err := json.Marshal(common.TopicNodeActivityPub{ Disposer: *ad, diff --git a/daemons/node/node.go b/daemons/node/node.go index c4adf0f..fd50428 100644 --- a/daemons/node/node.go +++ b/daemons/node/node.go @@ -237,7 +237,7 @@ func (d *Node) claimInfo( } rec.APIUrl = endPoint - rec.StreamAddress = "/ip4/" + conf.GetConfig().Hostname + " /tcp/" + fmt.Sprintf("%v", conf.GetConfig().NodeEndpointPort) + "/p2p/" + rec.PeerID + rec.StreamAddress = "/ip4/" + conf.GetConfig().Hostname + "/tcp/" + fmt.Sprintf("%v", conf.GetConfig().NodeEndpointPort) + "/p2p/" + rec.PeerID rec.NATSAddress = oclib.GetConfig().NATSUrl rec.WalletAddress = "my-wallet" rec.ExpiryDate = expiry