From cb350dffa9f7accddc64162b2341e73043f13a87 Mon Sep 17 00:00:00 2001 From: Ng Wei Han <47109095+weiihann@users.noreply.github.com> Date: Mon, 2 Sep 2024 23:07:46 +0800 Subject: [PATCH] Remove additional "kad" substring from p2p discovery protocol name (#2113) --- p2p/p2p.go | 2 +- p2p/starknet/ids.go | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/p2p/p2p.go b/p2p/p2p.go index 8b909f002c..73e7ac8550 100644 --- a/p2p/p2p.go +++ b/p2p/p2p.go @@ -165,7 +165,7 @@ func NewWithHost(p2phost host.Host, peers string, feederNode bool, bc *blockchai func makeDHT(p2phost host.Host, addrInfos []peer.AddrInfo) (*dht.IpfsDHT, error) { return dht.New(context.Background(), p2phost, - dht.ProtocolPrefix(starknet.KadPrefix()), + dht.ProtocolPrefix(starknet.Prefix), dht.BootstrapPeers(addrInfos...), dht.RoutingTableRefreshPeriod(routingTableRefreshPeriod), dht.Mode(dht.ModeServer), diff --git a/p2p/starknet/ids.go b/p2p/starknet/ids.go index 67b695c3dc..d1b97b0ad2 100644 --- a/p2p/starknet/ids.go +++ b/p2p/starknet/ids.go @@ -6,10 +6,6 @@ import ( const Prefix = "/starknet" -func KadPrefix() protocol.ID { - return Prefix + "/kad" -} - func HeadersPID() protocol.ID { return Prefix + "/headers/0.1.0-rc.0" }