1
0
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:
Brian Tiger Chow
2014-09-21 22:00:13 -07:00
parent b806270e5d
commit 2179b5d77b
2 changed files with 2 additions and 2 deletions

View File

@ -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)
} }

View File

@ -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)
} }