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

minor deepsource code hygiene fixes (#1049)

parent daecae2b
...@@ -93,8 +93,8 @@ var ( ...@@ -93,8 +93,8 @@ var (
// NewAccounting creates a new Accounting instance with the provided options. // NewAccounting creates a new Accounting instance with the provided options.
func NewAccounting( func NewAccounting(
PaymentThreshold uint64, PaymentThreshold,
PaymentTolerance uint64, PaymentTolerance,
EarlyPayment uint64, EarlyPayment uint64,
Logger logging.Logger, Logger logging.Logger,
Store storage.StateStorer, Store storage.StateStorer,
......
...@@ -184,7 +184,7 @@ func getTLD(name string) string { ...@@ -184,7 +184,7 @@ func getTLD(name string) string {
return path.Ext(strings.ToLower(name)) 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 log := mr.logger
if address == "" { if address == "" {
......
...@@ -95,7 +95,7 @@ func cashoutActionKey(chequebook common.Address) string { ...@@ -95,7 +95,7 @@ func cashoutActionKey(chequebook common.Address) string {
} }
// CashCheque sends a cashout transaction for the last cheque of the chequebook // 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) cheque, err := s.chequeStore.LastCheque(chequebook)
if err != nil { if err != nil {
return common.Hash{}, err return common.Hash{}, err
......
...@@ -80,7 +80,7 @@ type cashoutMock struct { ...@@ -80,7 +80,7 @@ type cashoutMock struct {
cashoutStatus func(ctx context.Context, chequebookAddress common.Address) (*chequebook.CashoutStatus, error) 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) return m.cashCheque(ctx, chequebook, recipient)
} }
func (m *cashoutMock) CashoutStatus(ctx context.Context, chequebookAddress common.Address) (*chequebook.CashoutStatus, error) { func (m *cashoutMock) CashoutStatus(ctx context.Context, chequebookAddress common.Address) (*chequebook.CashoutStatus, error) {
......
...@@ -8,7 +8,7 @@ import ( ...@@ -8,7 +8,7 @@ import (
"context" "context"
"fmt" "fmt"
"io" "io"
"os" "io/ioutil"
"testing" "testing"
"github.com/ethersphere/bee/pkg/logging" "github.com/ethersphere/bee/pkg/logging"
...@@ -130,7 +130,7 @@ func TestStartSpanFromContext_logger(t *testing.T) { ...@@ -130,7 +130,7 @@ func TestStartSpanFromContext_logger(t *testing.T) {
tracer, closer := newTracer(t) tracer, closer := newTracer(t)
defer closer.Close() 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() defer span.Finish()
wantTraceID := span.Context().(jaeger.SpanContext).TraceID() wantTraceID := span.Context().(jaeger.SpanContext).TraceID()
...@@ -169,7 +169,7 @@ func TestNewLoggerWithTraceID(t *testing.T) { ...@@ -169,7 +169,7 @@ func TestNewLoggerWithTraceID(t *testing.T) {
span, _, ctx := tracer.StartSpanFromContext(context.Background(), "some-operation", nil) span, _, ctx := tracer.StartSpanFromContext(context.Background(), "some-operation", nil)
defer span.Finish() 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() 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