mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
core: simplify condition
This commit is contained in:
parent
8a3508441a
commit
05b0941a0d
1 changed files with 1 additions and 7 deletions
|
|
@ -403,13 +403,7 @@ func GenerateChainWithGenesis(genesis *Genesis, engine consensus.Engine, n int,
|
|||
}
|
||||
|
||||
func (cm *chainMaker) makeHeader(parent *types.Block, state *state.StateDB, engine consensus.Engine) *types.Header {
|
||||
var time uint64
|
||||
if parent.Time() == 0 {
|
||||
time = 10
|
||||
} else {
|
||||
time = parent.Time() + 10 // block time is fixed at 10 seconds
|
||||
}
|
||||
|
||||
time := parent.Time() + 10 // block time is fixed at 10 seconds
|
||||
header := &types.Header{
|
||||
Root: state.IntermediateRoot(cm.config.IsEIP158(parent.Number())),
|
||||
ParentHash: parent.Hash(),
|
||||
|
|
|
|||
Loading…
Reference in a new issue