Skip to content

Commit

Permalink
Fix build error by replacing containBlock
Browse files Browse the repository at this point in the history
Signed-off-by: Xiang Fu <[email protected]>
  • Loading branch information
Xiang Fu authored and dreamfly281 committed Aug 3, 2017
1 parent c2f8841 commit 45e843a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/store/ChainStore/ChainStore.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 45e843a

Please sign in to comment.