Skip to content

Commit

Permalink
feat: pass libp2p host to vole
Browse files Browse the repository at this point in the history
  • Loading branch information
2color committed Jul 31, 2024
1 parent d6e994f commit 1613bb5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 1613bb5

Please sign in to comment.