Skip to content

Commit

Permalink
workaround @ConnectBlock issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
qiwei9743 committed Sep 26, 2018
1 parent 0a967c4 commit 865a89b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion logic/lchain/lchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@ func ConnectBlock(pblock *block.Block, pindex *blockindex.BlockIndex, view *utxo
if pindex.Prev == nil {
hashPrevBlock = &util.Hash{}
} else {
hashPrevBlock = pindex.GetBlockHash()
if fJustCheck {
hashPrevBlock = pindex.GetBlockHash()
} else {
hashPrevBlock = pindex.Prev.GetBlockHash()
}
}
gUtxo := utxo.GetUtxoCacheInstance()
bestHash, _ := gUtxo.GetBestBlock()
Expand Down

0 comments on commit 865a89b

Please sign in to comment.