Skip to content
This repository was archived by the owner on Jul 1, 2025. It is now read-only.

Commit a516c17

Browse files
fab-10garyschulte
authored andcommitted
Fix simulate pending block timestamp (#8027)
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
1 parent 8475ff7 commit a516c17

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ethereum/core/src/main/java/org/hyperledger/besu/ethereum/transaction/TransactionSimulator.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
*/
1515
package org.hyperledger.besu.ethereum.transaction;
1616

17+
import static java.util.concurrent.TimeUnit.MILLISECONDS;
1718
import static org.hyperledger.besu.ethereum.mainnet.feemarket.ExcessBlobGasCalculator.calculateExcessBlobGasForParent;
1819

1920
import org.hyperledger.besu.crypto.SECPSignature;
@@ -176,7 +177,7 @@ public Optional<TransactionSimulatorResult> processOnPending(
176177
}
177178

178179
public ProcessableBlockHeader simulatePendingBlockHeader() {
179-
final long timestamp = System.currentTimeMillis();
180+
final long timestamp = MILLISECONDS.toSeconds(System.currentTimeMillis());
180181
final var chainHeadHeader = blockchain.getChainHeadHeader();
181182
final ProtocolSpec protocolSpec =
182183
protocolSchedule.getForNextBlockHeader(chainHeadHeader, timestamp);

0 commit comments

Comments
 (0)