From 1613bb58a1898534bc846cdb1d792cbb17a72918 Mon Sep 17 00:00:00 2001 From: Daniel N <2color@users.noreply.github.com> Date: Wed, 31 Jul 2024 15:31:41 +0200 Subject: [PATCH] feat: pass libp2p host to vole depends on https://github.com/ipfs-shipyard/vole/pull/43/ --- daemon.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/daemon.go b/daemon.go index 4efd280..266c8a2 100644 --- a/daemon.go +++ b/daemon.go @@ -175,17 +175,17 @@ func (d *daemon) runCheck(query url.Values) (*output, error) { out.DataAvailableOverBitswap.Error = "could not connect to peer" } else { // If so is the data available over Bitswap? - out.DataAvailableOverBitswap = checkBitswapCID(ctx, c, ma) + out.DataAvailableOverBitswap = checkBitswapCID(ctx, testHost, c, ma) } return out, nil } -func checkBitswapCID(ctx context.Context, c cid.Cid, ma multiaddr.Multiaddr) BitswapCheckOutput { +func checkBitswapCID(ctx context.Context, host host.Host, c cid.Cid, ma multiaddr.Multiaddr) BitswapCheckOutput { out := BitswapCheckOutput{} start := time.Now() - bsOut, err := vole.CheckBitswapCID(ctx, c, ma, false) + bsOut, err := vole.CheckBitswapCID(ctx, host, c, ma, false) if err != nil { out.Error = err.Error() } else {