func WithBalancesFunc(f func() (map[string]*big.Int, error)) Option {
	return optionFunc(func(s *Service) {
		s.balancesFunc = f
	})
}
WithBalancesFunc sets the mock Balances function
package mock
import (
	"context"
	"math/big"
	"sync"
	"github.com/ethsana/sana/pkg/accounting"
	"github.com/ethsana/sana/pkg/swarm"
)
type Service struct {
	lock                    sync.Mutex
	balances                map[string]*big.Int
	reserveFunc             func(ctx context.Context, peer swarm.Address, price uint64) error
	releaseFunc             func(peer swarm.Address, price uint64)
	creditFunc              func(peer swarm.Address, price uint64, orig bool) error
	prepareDebitFunc        func(peer swarm.Address, price uint64) (accounting.Action, error)
	balanceFunc             func(swarm.Address) (*big.Int, error)
	shadowBalanceFunc       func(swarm.Address) (*big.Int, error)
	balancesFunc            func() (map[string]*big.Int, error)
	compensatedBalanceFunc  func(swarm.Address) (*big.Int, error)
	compensatedBalancesFunc func() (map[string]*big.Int, error)
	balanceSurplusFunc func(swarm.Address) (*big.Int, error)
}
type debitAction struct {
	accounting *Service
	price      *big.Int
	peer       swarm.Address
	applied    bool
}
func WithReserveFunc(f func(ctx context.Context, peer swarm.Address, price uint64) error) Option {
	return optionFunc(func(s *Service) {
		s.reserveFunc = f
	})
}
func WithReleaseFunc(f func(peer swarm.Address, price uint64)) Option {
	return optionFunc(func(s *Service) {
		s.releaseFunc = f
	})
}
func WithCreditFunc(f func(peer swarm.Address, price uint64, orig bool) error) Option {
	return optionFunc(func(s *Service) {
		s.creditFunc = f
	})
}
func WithPrepareDebitFunc(f func(peer swarm.Address, price uint64) (accounting.Action, error)) Option {
	return optionFunc(func(s *Service) {
		s.prepareDebitFunc = f
	})
}
func WithBalanceFunc(f func(swarm.Address) (*big.Int, error)) Option {
	return optionFunc(func(s *Service) {
		s.balanceFunc = f
	})
}