mirror of
https://github.com/ipfs/kubo.git
synced 2025-07-01 02:30:39 +08:00
fix(bitswap:testnet) Provide takes ctx
This commit is contained in:
@ -92,6 +92,6 @@ func (a *routingClient) FindProvidersAsync(ctx context.Context, k u.Key, max int
|
|||||||
return out
|
return out
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *routingClient) Provide(key u.Key) error {
|
func (a *routingClient) Provide(_ context.Context, key u.Key) error {
|
||||||
return a.hashTable.Announce(a.peer, key)
|
return a.hashTable.Announce(a.peer, key)
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,7 @@ func TestClientFindProviders(t *testing.T) {
|
|||||||
rs := VirtualRoutingServer()
|
rs := VirtualRoutingServer()
|
||||||
client := rs.Client(peer)
|
client := rs.Client(peer)
|
||||||
k := u.Key("hello")
|
k := u.Key("hello")
|
||||||
err := client.Provide(k)
|
err := client.Provide(context.Background(), k)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user