mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-18 02:40:45 +00:00
Merge pull request #637 from XinFinOrg/dev-upgrade-fix-merge
Dev upgrade fix merge for https://github.com/XinFinOrg/XDPoSChain/pull/635
This commit is contained in:
commit
c6744e1a9f
1 changed files with 2 additions and 0 deletions
|
|
@ -664,8 +664,10 @@ func (bc *BlockChain) ExportN(w io.Writer, first uint64, last uint64) error {
|
||||||
//
|
//
|
||||||
// Note, this function assumes that the `mu` mutex is held!
|
// Note, this function assumes that the `mu` mutex is held!
|
||||||
func (bc *BlockChain) insert(block *types.Block, writeBlock bool) {
|
func (bc *BlockChain) insert(block *types.Block, writeBlock bool) {
|
||||||
|
|
||||||
blockHash := block.Hash()
|
blockHash := block.Hash()
|
||||||
blockNumberU64 := block.NumberU64()
|
blockNumberU64 := block.NumberU64()
|
||||||
|
|
||||||
// If the block is on a side chain or an unknown one, force other heads onto it too
|
// If the block is on a side chain or an unknown one, force other heads onto it too
|
||||||
updateHeads := GetCanonicalHash(bc.db, blockNumberU64) != blockHash
|
updateHeads := GetCanonicalHash(bc.db, blockNumberU64) != blockHash
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue