修复依赖

This commit is contained in:
2025-10-15 14:19:16 +08:00
parent c52d5359e9
commit 865d6fac65
9 changed files with 47 additions and 91 deletions

View File

@@ -9,7 +9,7 @@ import (
)
// 初始化无服务器DHT作为节点加入DHT网络
func (s *sP2P) InitDHT(ctx context.Context, h host.Host) (*dht.IpfsDHT, error) {
func (s *sP2P) DHTStart(ctx context.Context, h host.Host) (*dht.IpfsDHT, error) {
// 创建DHT实例设置为“客户端+服务端模式”(既可以查找数据,也可以存储数据)
kdht, err := dht.New(ctx, h, dht.Mode(dht.ModeServer))
if err != nil {