diff options
author | obscuren <geffobscura@gmail.com> | 2014-08-04 16:38:18 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-08-04 16:38:18 +0800 |
commit | 3debeb7236d2c8474fa9049cc91dc26bf1040b3f (patch) | |
tree | 928b5ff8486ea485a3efae8cc69adaf54af9c87e /ethchain/block_chain.go | |
parent | 2e7cf835222274a311302c33498cf83bb2593b7a (diff) | |
download | go-tangerine-3debeb7236d2c8474fa9049cc91dc26bf1040b3f.tar go-tangerine-3debeb7236d2c8474fa9049cc91dc26bf1040b3f.tar.gz go-tangerine-3debeb7236d2c8474fa9049cc91dc26bf1040b3f.tar.bz2 go-tangerine-3debeb7236d2c8474fa9049cc91dc26bf1040b3f.tar.lz go-tangerine-3debeb7236d2c8474fa9049cc91dc26bf1040b3f.tar.xz go-tangerine-3debeb7236d2c8474fa9049cc91dc26bf1040b3f.tar.zst go-tangerine-3debeb7236d2c8474fa9049cc91dc26bf1040b3f.zip |
ethtrie.NewTrie => ethtrie.New
Diffstat (limited to 'ethchain/block_chain.go')
-rw-r--r-- | ethchain/block_chain.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ethchain/block_chain.go b/ethchain/block_chain.go index 250903798..736fe52c7 100644 --- a/ethchain/block_chain.go +++ b/ethchain/block_chain.go @@ -132,7 +132,7 @@ func (bc *BlockChain) FindCanonicalChain(blocks []*Block, commonBlockHash []byte // Start with the newest block we got, all the way back to the common block we both know for _, block := range blocks { if bytes.Compare(block.Hash(), commonBlockHash) == 0 { - chainlogger.Infoln("[CHAIN] We have found the common parent block, breaking") + chainlogger.Infoln("We have found the common parent block, breaking") break } chainDifficulty.Add(chainDifficulty, bc.CalculateBlockTD(block)) @@ -145,13 +145,13 @@ func (bc *BlockChain) FindCanonicalChain(blocks []*Block, commonBlockHash []byte for i := 0; block != nil; block = bc.GetBlock(block.PrevHash) { i++ if bytes.Compare(block.Hash(), commonBlockHash) == 0 { - chainlogger.Infoln("We have found the common parent block, breaking") + chainlogger.Infoln("Found the common parent block") break } anOtherBlock := bc.GetBlock(block.PrevHash) if anOtherBlock == nil { // We do not want to count the genesis block for difficulty since that's not being sent - chainlogger.Infoln("At genesis block, breaking") + chainlogger.Infoln("Found genesis block. Stop") break } curChainDifficulty.Add(curChainDifficulty, bc.CalculateBlockTD(block)) @@ -159,11 +159,11 @@ func (bc *BlockChain) FindCanonicalChain(blocks []*Block, commonBlockHash []byte chainlogger.Infoln("Current chain difficulty:", curChainDifficulty) if chainDifficulty.Cmp(curChainDifficulty) == 1 { - chainlogger.Infof("The incoming Chain beat our asses, resetting to block: %x", commonBlockHash) + chainlogger.Infof("Resetting to block %x. Changing chain.") bc.ResetTillBlockHash(commonBlockHash) return false } else { - chainlogger.Infoln("Our chain showed the incoming chain who is boss. Ignoring.") + chainlogger.Infoln("Current chain is longest chain. Ignoring incoming chain.") return true } } |