diff --git a/p2p/p2p.go b/p2p/p2p.go index 49633f49e..2767e06e2 100644 --- a/p2p/p2p.go +++ b/p2p/p2p.go @@ -106,6 +106,7 @@ func New(addr, publicAddr, version, peers, privKeyStr string, feederNode bool, b libp2p.EnableHolePunching(), // Try to open a port in the NAT router to accept incoming connections. libp2p.NATPortMap(), + libp2p.Ping(true), ) if err != nil { return nil, err @@ -166,7 +167,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.Prefix), + dht.ProtocolPrefix(starknet.Prefix+"/kad/SN_SEPOLIA/1.0.0"), dht.BootstrapPeers(addrInfos...), dht.RoutingTableRefreshPeriod(routingTableRefreshPeriod), dht.Mode(dht.ModeServer), diff --git a/p2p/starknet/handlers.go b/p2p/starknet/handlers.go index 28c4eee5f..f1311ea2e 100644 --- a/p2p/starknet/handlers.go +++ b/p2p/starknet/handlers.go @@ -56,6 +56,7 @@ func getBuffer() *bytes.Buffer { func streamHandler[ReqT proto.Message](ctx context.Context, wg *sync.WaitGroup, stream network.Stream, reqHandler func(req ReqT) (iter.Seq[proto.Message], error), log utils.SimpleLogger, ) { + fmt.Println("streamHandler") wg.Add(1) defer wg.Done()