mirror of https://github.com/poanetwork/quorum.git
Minor fixes (#803)
This commit is contained in:
parent
6a3a6900bc
commit
4b45dd2004
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
language: go
|
language: go
|
||||||
go_import_path: github.com/ethereum/go-ethereum
|
go_import_path: github.com/ethereum/go-ethereum
|
||||||
go: 1.11.x
|
go: 1.11.12
|
||||||
sudo: true
|
sudo: true
|
||||||
branches:
|
branches:
|
||||||
only:
|
only:
|
||||||
|
|
|
@ -302,7 +302,7 @@ func (ethash *Ethash) verifyHeader(chain consensus.ChainReader, header, parent *
|
||||||
}
|
}
|
||||||
limit := parent.GasLimit / params.OriginalGasLimitBoundDivisor
|
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)
|
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
|
// Verify that the block number is parent's +1
|
||||||
|
|
|
@ -1271,9 +1271,8 @@ func (bc *BlockChain) insertChain(chain types.Blocks) (int, []interface{}, []*ty
|
||||||
if err := WritePrivateStateRoot(bc.db, block.Root(), privateStateRoot); err != nil {
|
if err := WritePrivateStateRoot(bc.db, block.Root(), privateStateRoot); err != nil {
|
||||||
return i, events, coalescedLogs, err
|
return i, events, coalescedLogs, err
|
||||||
}
|
}
|
||||||
// /Quorum
|
|
||||||
|
|
||||||
allReceipts := mergeReceipts(receipts, privateReceipts)
|
allReceipts := mergeReceipts(receipts, privateReceipts)
|
||||||
|
// /Quorum
|
||||||
|
|
||||||
proctime := time.Since(bstart)
|
proctime := time.Since(bstart)
|
||||||
|
|
||||||
|
|
10
eth/sync.go
10
eth/sync.go
|
@ -218,14 +218,4 @@ func (pm *ProtocolManager) synchronise(peer *peer) {
|
||||||
// more reliably update peers or the local TD state.
|
// more reliably update peers or the local TD state.
|
||||||
go pm.BroadcastBlock(head, false)
|
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)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,7 @@ var (
|
||||||
|
|
||||||
const (
|
const (
|
||||||
// these are original values from upstream Geth, used in ethash consensus
|
// 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.
|
OriginalGasLimitBoundDivisor uint64 = 1024 // Minimum the gas limit may ever be.
|
||||||
|
|
||||||
// modified values for Quorum
|
// modified values for Quorum
|
||||||
|
|
Loading…
Reference in New Issue