From 65213973cc69cd97768fd5ffbad2a7e80036b360 Mon Sep 17 00:00:00 2001 From: rjl493456442 Date: Wed, 20 Nov 2019 16:41:43 +0800 Subject: [PATCH] core, light: address comments --- core/blockchain.go | 6 +++--- light/lightchain.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/blockchain.go b/core/blockchain.go index 04da0bab8d..a9c59567c2 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -408,7 +408,7 @@ func (bc *BlockChain) SetHead(head uint64) error { rawdb.WriteHeadBlockHash(db, newHeadBlock.Hash()) // Degrade the chain markers if they are explicitly reverted. - // In thoery we should update all in-memory markers in the + // In theory we should update all in-memory markers in the // last step, however the direction of SetHead is from high // to low, so it's safe the update in-memory markers directly. bc.currentBlock.Store(newHeadBlock) @@ -425,7 +425,7 @@ func (bc *BlockChain) SetHead(head uint64) error { rawdb.WriteHeadFastBlockHash(db, newHeadFastBlock.Hash()) // Degrade the chain markers if they are explicitly reverted. - // In thoery we should update all in-memory markers in the + // In theory we should update all in-memory markers in the // last step, however the direction of SetHead is from high // to low, so it's safe the update in-memory markers directly. bc.currentFastBlock.Store(newHeadFastBlock) @@ -903,7 +903,7 @@ func (bc *BlockChain) Rollback(chain []common.Hash) { hash := chain[i] // Degrade the chain markers if they are explicitly reverted. - // In thoery we should update all in-memory markers in the + // In theory we should update all in-memory markers in the // last step, however the direction of rollback is from high // to low, so it's safe the update in-memory markers directly. currentHeader := bc.hc.CurrentHeader() diff --git a/light/lightchain.go b/light/lightchain.go index 6173bc7a29..636e06f518 100644 --- a/light/lightchain.go +++ b/light/lightchain.go @@ -331,7 +331,7 @@ func (lc *LightChain) Rollback(chain []common.Hash) { hash := chain[i] // Degrade the chain markers if they are explicitly reverted. - // In thoery we should update all in-memory markers in the + // In theory we should update all in-memory markers in the // last step, however the direction of rollback is from high // to low, so it's safe the update in-memory markers directly. if head := lc.hc.CurrentHeader(); head.Hash() == hash {