limit optimistic provide test to legacy provider

This commit is contained in:
guillaumemichel 2025-10-24 11:57:17 +02:00
parent 46bf19211c
commit 6c15a941ae
No known key found for this signature in database
GPG Key ID: 612745DB2E6D0E15

View File

@ -17,13 +17,14 @@ func TestDHTOptimisticProvide(t *testing.T) {
nodes[0].UpdateConfig(func(cfg *config.Config) {
cfg.Experimental.OptimisticProvide = true
// Optimistic provide only works with the legacy provider.
cfg.Provide.DHT.SweepEnabled = config.False
})
nodes.StartDaemons().Connect()
hash := nodes[0].IPFSAddStr(string(random.Bytes(100)))
nodes[0].IPFS("routing", "provide", hash)
waitUntilProvidesComplete(t, nodes[0])
res := nodes[1].IPFS("routing", "findprovs", "--num-providers=1", hash)
assert.Equal(t, nodes[0].PeerID().String(), res.Stdout.Trimmed())