Skip to content
This repository has been archived by the owner on Feb 1, 2023. It is now read-only.

Commit

Permalink
fix: incorrect type in the WithTracer polyfill option
Browse files Browse the repository at this point in the history
  • Loading branch information
Jorropo committed Sep 8, 2022
1 parent 64bf4e9 commit 1ccd151
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bitswap.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func New(ctx context.Context, net network.BitSwapNetwork, bstore blockstore.Bloc
case option:
typedOption(bs)
default:
panic(fmt.Errorf("unknown option type passed to bitswap.New, got: %T, %v; expected: %T, %T or %T", typedOption, typedOption, server.Option(nil), client.Option(nil), option{}))
panic(fmt.Errorf("unknown option type passed to bitswap.New, got: %T, %v; expected: %T, %T or %T", typedOption, typedOption, server.Option(nil), client.Option(nil), option(nil)))
}
}

Expand Down
4 changes: 2 additions & 2 deletions options.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ func SetSimulateDontHavesOnTimeout(send bool) Option {
func WithTracer(tap tracer.Tracer) Option {
// Only trace the server, both receive the same messages anyway
return Option{
func(bs *Bitswap) {
option(func(bs *Bitswap) {
bs.tracer = tap
},
}),
}
}

0 comments on commit 1ccd151

Please sign in to comment.