From e780bde12fc2e9f600e7b8ae384a270139cb5ca8 Mon Sep 17 00:00:00 2001 From: DinhLN Date: Mon, 24 Dec 2018 16:10:11 +0700 Subject: [PATCH] Fixed comment. --- cmd/tomo/config.go | 2 +- consensus/posv/posv.go | 1 - core/blockchain.go | 10 +++++----- miner/worker.go | 2 +- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/cmd/tomo/config.go b/cmd/tomo/config.go index 51d6bf8869..b6ec2db452 100644 --- a/cmd/tomo/config.go +++ b/cmd/tomo/config.go @@ -28,6 +28,7 @@ import ( "unicode" "github.com/ethereum/go-ethereum/cmd/utils" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/dashboard" "github.com/ethereum/go-ethereum/eth" "github.com/ethereum/go-ethereum/internal/debug" @@ -36,7 +37,6 @@ import ( "github.com/ethereum/go-ethereum/params" whisper "github.com/ethereum/go-ethereum/whisper/whisperv6" "github.com/naoina/toml" - "github.com/ethereum/go-ethereum/common" ) var ( diff --git a/consensus/posv/posv.go b/consensus/posv/posv.go index 3bf49e95ae..6ffa7df47e 100644 --- a/consensus/posv/posv.go +++ b/consensus/posv/posv.go @@ -480,7 +480,6 @@ func (c *Posv) YourTurn(chain consensus.ChainReader, parent *types.Header, signe // Only three mns for tomo testnet. masternodes = masternodes[:3] } - log.Error("masternodes", "masternodes", len(masternodes)) snap, err := c.GetSnapshot(chain, parent) if err != nil { log.Warn("Failed when trying to commit new work", "err", err) diff --git a/core/blockchain.go b/core/blockchain.go index e68f0bdedd..1ea79d0440 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -127,11 +127,11 @@ type BlockChain struct { bodyRLPCache *lru.Cache // Cache for the most recent block bodies in RLP encoded format blockCache *lru.Cache // Cache for the most recent entire blocks futureBlocks *lru.Cache // future blocks are blocks added for later processing - resultProcess *lru.Cache // Cache for processed blocks - calculatingBlock *lru.Cache // Cache for processing blocks - downloadingBlock *lru.Cache // Cache for downloading blocks (avoid duplication from fetcher) - quit chan struct{} // blockchain quit channel - running int32 // running must be called atomically + resultProcess *lru.Cache // Cache for processed blocks + calculatingBlock *lru.Cache // Cache for processing blocks + downloadingBlock *lru.Cache // Cache for downloading blocks (avoid duplication from fetcher) + quit chan struct{} // blockchain quit channel + running int32 // running must be called atomically // procInterrupt must be atomically called procInterrupt int32 // interrupt signaler for block processing wg sync.WaitGroup // chain processing wait group for shutting down diff --git a/miner/worker.go b/miner/worker.go index d229c7979d..0684bfa28e 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -497,7 +497,7 @@ func (self *worker) commitNewWork() { if self.config.Posv != nil { // get masternodes set from latest checkpoint c := self.engine.(*posv.Posv) - len, preIndex, curIndex, ok, err := c.YourTurn(self.chain, parent.Header(),self.coinbase) + len, preIndex, curIndex, ok, err := c.YourTurn(self.chain, parent.Header(), self.coinbase) if err != nil { log.Warn("Failed when trying to commit new work", "err", err) return