From 45e843a915fe89aa1e45c1bf79c6acfba71c1c84 Mon Sep 17 00:00:00 2001 From: Xiang Fu Date: Mon, 31 Jul 2017 14:28:52 +0800 Subject: [PATCH] Fix build error by replacing containBlock Signed-off-by: Xiang Fu --- core/store/ChainStore/ChainStore.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/store/ChainStore/ChainStore.go b/core/store/ChainStore/ChainStore.go index f0dd993c..d8332436 100644 --- a/core/store/ChainStore/ChainStore.go +++ b/core/store/ChainStore/ChainStore.go @@ -164,7 +164,7 @@ func (bd *ChainStore) InitLedgerStoreWithGenesisBlock(genesisBlock *Block, defau if version[0] == 0x01 { // GenesisBlock should exist in chain // Or the bookkeepers are not consistent with the chain - if !bd.containsBlock(hash) { + if !bd.IsBlockInStore(hash) { return 0, errors.New("bookkeepers are not consistent with the chain") } // Get Current Block @@ -744,7 +744,7 @@ func (bd *ChainStore) persist(b *Block) error { if len(currBookKeeper) != len(nextBookKeeper) { needUpdateBookKeeper = true } else { - for i, _ := range currBookKeeper { + for i := range currBookKeeper { if currBookKeeper[i].X.Cmp(nextBookKeeper[i].X) != 0 || currBookKeeper[i].Y.Cmp(nextBookKeeper[i].Y) != 0 { needUpdateBookKeeper = true