Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pkg/accounting/mock/accounting.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ type creditAction struct {
applied bool
}

// WithDebitFunc sets the mock Debit function
// WithPrepareDebitFunc sets the mock PrepareDebit function
func WithPrepareDebitFunc(f func(peer swarm.Address, price uint64) (accounting.Action, error)) Option {
return optionFunc(func(s *Service) {
s.prepareDebitFunc = f
})
}

// WithDebitFunc sets the mock Debit function
// WithPrepareCreditFunc sets the mock PrepareCredit function
func WithPrepareCreditFunc(f func(peer swarm.Address, price uint64, originated bool) (accounting.Action, error)) Option {
return optionFunc(func(s *Service) {
s.prepareCreditFunc = f
Expand Down
Loading