Commit e32b3525 authored by acud's avatar acud Committed by GitHub

minor deepsource code hygiene fixes (#1049)

parent daecae2b
......@@ -93,8 +93,8 @@ var (
// NewAccounting creates a new Accounting instance with the provided options.
func NewAccounting(
PaymentThreshold uint64,
PaymentTolerance uint64,
PaymentThreshold,
PaymentTolerance,
EarlyPayment uint64,
Logger logging.Logger,
Store storage.StateStorer,
......
......@@ -184,7 +184,7 @@ func getTLD(name string) string {
return path.Ext(strings.ToLower(name))
}
func (mr *MultiResolver) connectENSClient(tld string, address string, endpoint string) {
func (mr *MultiResolver) connectENSClient(tld, address, endpoint string) {
log := mr.logger
if address == "" {
......
......@@ -95,7 +95,7 @@ func cashoutActionKey(chequebook common.Address) string {
}
// CashCheque sends a cashout transaction for the last cheque of the chequebook
func (s *cashoutService) CashCheque(ctx context.Context, chequebook common.Address, recipient common.Address) (common.Hash, error) {
func (s *cashoutService) CashCheque(ctx context.Context, chequebook, recipient common.Address) (common.Hash, error) {
cheque, err := s.chequeStore.LastCheque(chequebook)
if err != nil {
return common.Hash{}, err
......
......@@ -80,7 +80,7 @@ type cashoutMock struct {
cashoutStatus func(ctx context.Context, chequebookAddress common.Address) (*chequebook.CashoutStatus, error)
}
func (m *cashoutMock) CashCheque(ctx context.Context, chequebook common.Address, recipient common.Address) (common.Hash, error) {
func (m *cashoutMock) CashCheque(ctx context.Context, chequebook, recipient common.Address) (common.Hash, error) {
return m.cashCheque(ctx, chequebook, recipient)
}
func (m *cashoutMock) CashoutStatus(ctx context.Context, chequebookAddress common.Address) (*chequebook.CashoutStatus, error) {
......
......@@ -8,7 +8,7 @@ import (
"context"
"fmt"
"io"
"os"
"io/ioutil"
"testing"
"github.com/ethersphere/bee/pkg/logging"
......@@ -130,7 +130,7 @@ func TestStartSpanFromContext_logger(t *testing.T) {
tracer, closer := newTracer(t)
defer closer.Close()
span, logger, _ := tracer.StartSpanFromContext(context.Background(), "some-operation", logging.New(os.Stdout, 5))
span, logger, _ := tracer.StartSpanFromContext(context.Background(), "some-operation", logging.New(ioutil.Discard, 0))
defer span.Finish()
wantTraceID := span.Context().(jaeger.SpanContext).TraceID()
......@@ -169,7 +169,7 @@ func TestNewLoggerWithTraceID(t *testing.T) {
span, _, ctx := tracer.StartSpanFromContext(context.Background(), "some-operation", nil)
defer span.Finish()
logger := tracing.NewLoggerWithTraceID(ctx, logging.New(os.Stdout, 5))
logger := tracing.NewLoggerWithTraceID(ctx, logging.New(ioutil.Discard, 0))
wantTraceID := span.Context().(jaeger.SpanContext).TraceID()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment