Remove unused parameter (#2069)

This commit is contained in:
Michal Niewrzal 2019-05-29 11:15:15 +02:00 committed by GitHub
parent fb86238acc
commit 03bae48ad6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 19 deletions

View File

@ -53,30 +53,27 @@ type Containment interface {
// Endpoint metainfo endpoint
type Endpoint struct {
log *zap.Logger
metainfo *Service
orders *orders.Service
cache *overlay.Cache
projectUsage *accounting.ProjectUsage
containment Containment
apiKeys APIKeys
storagenodeAccountingDB accounting.StoragenodeAccounting
log *zap.Logger
metainfo *Service
orders *orders.Service
cache *overlay.Cache
projectUsage *accounting.ProjectUsage
containment Containment
apiKeys APIKeys
}
// NewEndpoint creates new metainfo endpoint instance
func NewEndpoint(log *zap.Logger, metainfo *Service, orders *orders.Service, cache *overlay.Cache, containment Containment,
apiKeys APIKeys, sdb accounting.StoragenodeAccounting,
projectUsage *accounting.ProjectUsage) *Endpoint {
apiKeys APIKeys, projectUsage *accounting.ProjectUsage) *Endpoint {
// TODO do something with too many params
return &Endpoint{
log: log,
metainfo: metainfo,
orders: orders,
cache: cache,
containment: containment,
apiKeys: apiKeys,
storagenodeAccountingDB: sdb,
projectUsage: projectUsage,
log: log,
metainfo: metainfo,
orders: orders,
cache: cache,
containment: containment,
apiKeys: apiKeys,
projectUsage: projectUsage,
}
}

View File

@ -369,7 +369,6 @@ func New(log *zap.Logger, full *identity.FullIdentity, db DB, config *Config, ve
peer.Overlay.Service,
peer.DB.Containment(),
peer.DB.Console().APIKeys(),
peer.DB.StoragenodeAccounting(),
peer.Accounting.ProjectUsage,
)