This commit is contained in:
Gabriel mermelstein 2024-11-27 17:29:32 +02:00
parent 73321c4199
commit 2fc438055a
No known key found for this signature in database
GPG Key ID: 82B8134785FEAE0D

View File

@ -319,6 +319,7 @@ import (
"time"
"unsafe"
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/p2p/enode"
"github.com/libp2p/go-libp2p/core/peer"
libp2pproto "github.com/libp2p/go-libp2p/core/protocol"
@ -330,6 +331,8 @@ import (
"go.uber.org/zap"
)
const requestTimeout = 30 * time.Second
type WakuConfig struct {
Host string `json:"host,omitempty"`
Port int `json:"port,omitempty"`
@ -513,6 +516,7 @@ func New(nwakuCfg *WakuConfig, logger *zap.Logger) (*Waku, error) {
logger.Info("starting wakuv2 with config", zap.Any("nwakuCfg", nwakuCfg))
ctx, cancel := context.WithCancel(context.Background())
wakunode, err := newWakuNode(ctx, nwakuCfg)
if err != nil {
cancel()