allow block with same block time

This commit is contained in:
0g-wh 2025-04-22 03:04:08 +00:00
parent 5ff869fba2
commit cce928eaaf

View file

@ -171,10 +171,10 @@ func (miner *Miner) prepareWork(genParams *generateParams, witness bool) (*envir
// to parent+1 if the mutation is allowed. // to parent+1 if the mutation is allowed.
timestamp := genParams.timestamp timestamp := genParams.timestamp
if parent.Time >= timestamp { if parent.Time >= timestamp {
if genParams.forceTime { /*if genParams.forceTime {
return nil, fmt.Errorf("invalid timestamp, parent %d given %d", parent.Time, timestamp) return nil, fmt.Errorf("invalid timestamp, parent %d given %d", parent.Time, timestamp)
} }*/
timestamp = parent.Time + 1 timestamp = parent.Time
} }
// Construct the sealing block header. // Construct the sealing block header.
header := &types.Header{ header := &types.Header{