From bd5fcbdcdea686388a5bf29f82a3f26b0e7603c8 Mon Sep 17 00:00:00 2001 From: Tuna Date: Mon, 10 Dec 2018 17:14:49 +0700 Subject: [PATCH] tiny make up --- consensus/posv/posv.go | 2 +- core/blockchain.go | 6 +++--- core/error.go | 2 +- eth/backend.go | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/consensus/posv/posv.go b/consensus/posv/posv.go index a36eea9150..e2916b2a5a 100644 --- a/consensus/posv/posv.go +++ b/consensus/posv/posv.go @@ -485,7 +485,7 @@ func (c *Posv) YourTurn(chain consensus.ChainReader, parent *types.Header, signe return 0, -1, -1, false, err } if len(masternodes) == 0 { - return 0, -1, -1, false, errors.New("Not found master nodes") + return 0, -1, -1, false, errors.New("Masternodes not found") } pre := common.Address{} // masternode[0] has chance to create block 1 diff --git a/core/blockchain.go b/core/blockchain.go index 9d1fbfff64..e68f0bdedd 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -127,9 +127,9 @@ 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 - calculatingBlock *lru.Cache - downloadingBlock *lru.Cache + 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 diff --git a/core/error.go b/core/error.go index 4af0d2922a..63be6ab83d 100644 --- a/core/error.go +++ b/core/error.go @@ -37,5 +37,5 @@ var ( ErrNotFoundM1 = errors.New("list M1 not found ") - ErrStopPreparingBlock = errors.New("stop calculate a block not vrified M2") + ErrStopPreparingBlock = errors.New("stop calculating a block not verified by M2") ) diff --git a/eth/backend.go b/eth/backend.go index ed11a8cae7..aba5539dd2 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -358,7 +358,7 @@ func New(ctx *node.ServiceContext, config *Config) (*Ethereum, error) { currentHeader := eth.blockchain.CurrentHeader() snap, err := c.GetSnapshot(eth.blockchain, currentHeader) if err != nil { - log.Error("Can't get snap shot with current header ", "number", currentHeader.Number, "hash", currentHeader.Hash().Hex()) + log.Error("Can't get snapshot with current header ", "number", currentHeader.Number, "hash", currentHeader.Hash().Hex()) return false } if _, ok := snap.Signers[address]; ok {