mirror of
https://github.com/vacp2p/status-linea-besu.git
synced 2026-01-09 13:58:02 -05:00
Fix simulate pending block timestamp (#8027)
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
This commit is contained in:
@@ -14,6 +14,7 @@
|
|||||||
*/
|
*/
|
||||||
package org.hyperledger.besu.ethereum.transaction;
|
package org.hyperledger.besu.ethereum.transaction;
|
||||||
|
|
||||||
|
import static java.util.concurrent.TimeUnit.MILLISECONDS;
|
||||||
import static org.hyperledger.besu.ethereum.mainnet.feemarket.ExcessBlobGasCalculator.calculateExcessBlobGasForParent;
|
import static org.hyperledger.besu.ethereum.mainnet.feemarket.ExcessBlobGasCalculator.calculateExcessBlobGasForParent;
|
||||||
|
|
||||||
import org.hyperledger.besu.crypto.SECPSignature;
|
import org.hyperledger.besu.crypto.SECPSignature;
|
||||||
@@ -176,7 +177,7 @@ public class TransactionSimulator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public ProcessableBlockHeader simulatePendingBlockHeader() {
|
public ProcessableBlockHeader simulatePendingBlockHeader() {
|
||||||
final long timestamp = System.currentTimeMillis();
|
final long timestamp = MILLISECONDS.toSeconds(System.currentTimeMillis());
|
||||||
final var chainHeadHeader = blockchain.getChainHeadHeader();
|
final var chainHeadHeader = blockchain.getChainHeadHeader();
|
||||||
final ProtocolSpec protocolSpec =
|
final ProtocolSpec protocolSpec =
|
||||||
protocolSchedule.getForNextBlockHeader(chainHeadHeader, timestamp);
|
protocolSchedule.getForNextBlockHeader(chainHeadHeader, timestamp);
|
||||||
|
|||||||
Reference in New Issue
Block a user