mirror of
https://github.com/arnaucube/hermez-node.git
synced 2026-02-07 19:36:44 +01:00
Add lint checks: gofmt, goimports, golint
- gofmt - Gofmt checks whether code was gofmt-ed. By default this tool runs
with -s option to check for code simplification
- goimports - Goimports does everything that gofmt does. Additionally it checks
unused imports
- golint - Golint differs from gofmt. Gofmt reformats Go source code, whereas
golint prints out style mistakes
- checks the uncommented exported functions & types
Update the code to fix the lint checks.
This commit is contained in:
@@ -14,8 +14,8 @@ import (
|
||||
"github.com/iden3/go-merkletree/db/memory"
|
||||
)
|
||||
|
||||
// CoordinatorConfig contains the Coordinator configuration
|
||||
type CoordinatorConfig struct {
|
||||
// Config contains the Coordinator configuration
|
||||
type Config struct {
|
||||
ForgerAddress ethCommon.Address
|
||||
LoopInterval time.Duration
|
||||
}
|
||||
@@ -29,7 +29,7 @@ type Coordinator struct {
|
||||
forging bool
|
||||
isForgeSeq bool // WIP just for testing while implementing
|
||||
|
||||
config CoordinatorConfig
|
||||
config Config
|
||||
|
||||
batchNum common.BatchNum
|
||||
batchQueue *BatchQueue
|
||||
@@ -45,7 +45,7 @@ type Coordinator struct {
|
||||
}
|
||||
|
||||
// NewCoordinator creates a new Coordinator
|
||||
func NewCoordinator(conf CoordinatorConfig,
|
||||
func NewCoordinator(conf Config,
|
||||
hdb *historydb.HistoryDB,
|
||||
txsel *txselector.TxSelector,
|
||||
bb *batchbuilder.BatchBuilder,
|
||||
@@ -61,6 +61,7 @@ func NewCoordinator(conf CoordinatorConfig,
|
||||
return &c
|
||||
}
|
||||
|
||||
// Stop stops the Coordinator
|
||||
func (c *Coordinator) Stop() {
|
||||
log.Info("Stopping Coordinator")
|
||||
c.stopch <- true
|
||||
|
||||
Reference in New Issue
Block a user