feat_: async nwaku (#6148)

* feat_: async nwaku
* fix_: remove nwaku process loop
This commit is contained in:
richΛrd 2024-12-03 09:06:22 -04:00 committed by GitHub
parent 28ee341959
commit cc2022b0c8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 265 additions and 532 deletions

2
third_party/nwaku vendored

@ -1 +1 @@
Subproject commit 507b1fc4d97a01ee5695a205f7f981bd4accc694
Subproject commit 47a6235414c2910ad9f540882bc5193ece84c552

View File

@ -76,6 +76,7 @@ func NewStorenodeCycle(logger *zap.Logger, pinger common.Pinger) *StorenodeCycle
StorenodeNotWorkingEmitter: NewEmitter[struct{}](),
StorenodeAvailableEmitter: NewEmitter[peer.ID](),
logger: logger.Named("storenode-cycle"),
pinger: pinger,
}
}

File diff suppressed because it is too large Load Diff

View File

@ -192,6 +192,8 @@ func TestBasicWakuV2(t *testing.T) {
storeNodeInfo, err := GetNwakuInfo(nil, &extNodeRestPort)
require.NoError(t, err)
ctx := context.Background()
wakuConfig := Config{
UseThrottledPublish: true,
ClusterID: 16,
@ -240,9 +242,7 @@ func TestBasicWakuV2(t *testing.T) {
storeNode, err := peer.AddrInfoFromString(storeNodeInfo.ListenAddresses[0])
require.NoError(t, err)
for i := 0; i <= 100; i++ {
time.Sleep(2 * time.Second)
}
w.node.DialPeer(ctx, storeNode.Addrs[0], "")
w.StorenodeCycle.SetStorenodeConfigProvider(newTestStorenodeConfigProvider(*storeNode))