Skip to content

Commit e714170

Browse files
committed
resolve conflict
1 parent 97139e2 commit e714170

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

plugin/evm/customheader/time.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,10 @@ func GetNextTimestamp(parent *types.Header, now time.Time) (uint64, uint64) {
4040
// the same timestamp as their parent. This allows more than one block to be produced
4141
// per second.
4242
// TODO QUESTION(ceyonur): is it better to just let it fail the verification / or just sleep?
43-
if parent.Time >= timestamp {
43+
parentExtra := customtypes.GetHeaderExtra(parent)
44+
if parent.Time >= timestamp ||
45+
(parentExtra.TimeMilliseconds != nil && *parentExtra.TimeMilliseconds >= timestampMS) {
4446
delayMS := uint64(0)
45-
parentExtra := customtypes.GetHeaderExtra(parent)
4647
// If parent has no min delay excess, blocks are allowed to have the same timestamp as their parent.
4748
// Else, there is a minimum delay enforced, and if the timestamp is the same as the parent,
4849
// the block will be rejected.

0 commit comments

Comments
 (0)