Skip to content

Commit

Permalink
Fix simulate pending block timestamp (hyperledger#8027)
Browse files Browse the repository at this point in the history
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
  • Loading branch information
fab-10 authored Dec 16, 2024
1 parent 98780ef commit 566583c
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
*/
package org.hyperledger.besu.ethereum.transaction;

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

import org.hyperledger.besu.crypto.SECPSignature;
Expand Down Expand Up @@ -176,7 +177,7 @@ public Optional<TransactionSimulatorResult> processOnPending(
}

public ProcessableBlockHeader simulatePendingBlockHeader() {
final long timestamp = System.currentTimeMillis();
final long timestamp = MILLISECONDS.toSeconds(System.currentTimeMillis());
final var chainHeadHeader = blockchain.getChainHeadHeader();
final ProtocolSpec protocolSpec =
protocolSchedule.getForNextBlockHeader(chainHeadHeader, timestamp);
Expand Down

0 comments on commit 566583c

Please sign in to comment.