Minor fixes (#803)

This commit is contained in:
Zhou Zhiyao 2019-08-17 20:37:58 +08:00 committed by Samer Falah
parent 6a3a6900bc
commit 4b45dd2004
5 changed files with 4 additions and 15 deletions

View File

@ -4,7 +4,7 @@
language: go
go_import_path: github.com/ethereum/go-ethereum
go: 1.11.x
go: 1.11.12
sudo: true
branches:
only:

View File

@ -302,7 +302,7 @@ func (ethash *Ethash) verifyHeader(chain consensus.ChainReader, header, parent *
}
limit := parent.GasLimit / params.OriginalGasLimitBoundDivisor
if uint64(diff) >= limit || header.GasLimit < params.OriginnalMinGasLimit {
if uint64(diff) >= limit || header.GasLimit < params.OriginalMinGasLimit {
return fmt.Errorf("invalid gas limit: have %d, want %d += %d", header.GasLimit, parent.GasLimit, limit)
}
// Verify that the block number is parent's +1

View File

@ -1271,9 +1271,8 @@ func (bc *BlockChain) insertChain(chain types.Blocks) (int, []interface{}, []*ty
if err := WritePrivateStateRoot(bc.db, block.Root(), privateStateRoot); err != nil {
return i, events, coalescedLogs, err
}
// /Quorum
allReceipts := mergeReceipts(receipts, privateReceipts)
// /Quorum
proctime := time.Since(bstart)

View File

@ -218,14 +218,4 @@ func (pm *ProtocolManager) synchronise(peer *peer) {
// more reliably update peers or the local TD state.
go pm.BroadcastBlock(head, false)
}
atomic.StoreUint32(&pm.acceptTxs, 1) // Mark initial sync done
if head := pm.blockchain.CurrentBlock(); head.NumberU64() > 0 {
// We've completed a sync cycle, notify all peers of new state. This path is
// essential in star-topology networks where a gateway node needs to notify
// all its out-of-date peers of the availability of a new block. This failure
// scenario will most often crop up in private and hackathon networks with
// degenerate connectivity, but it should be healthy for the mainnet too to
// more reliably update peers or the local TD state.
go pm.BroadcastBlock(head, false)
}
}

View File

@ -25,7 +25,7 @@ var (
const (
// these are original values from upstream Geth, used in ethash consensus
OriginnalMinGasLimit uint64 = 5000 // The bound divisor of the gas limit, used in update calculations.
OriginalMinGasLimit uint64 = 5000 // The bound divisor of the gas limit, used in update calculations.
OriginalGasLimitBoundDivisor uint64 = 1024 // Minimum the gas limit may ever be.
// modified values for Quorum