mirror of
https://github.com/vacp2p/status-linea-besu.git
synced 2026-01-08 23:08:15 -05:00
Support rpc pending block tag when estimating gas (#7951)
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
This commit is contained in:
@@ -154,7 +154,7 @@ public class CliqueMinerExecutorTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void extraDataForNonEpochBlocksDoesNotContainValidaors() {
|
||||
public void extraDataForNonEpochBlocksDoesNotContainValidators() {
|
||||
final Bytes vanityData = generateRandomVanityData();
|
||||
|
||||
final MiningConfiguration miningConfiguration = createMiningConfiguration(vanityData);
|
||||
|
||||
@@ -387,7 +387,7 @@ public class TestContextBuilder {
|
||||
final boolean useFixedBaseFee,
|
||||
final List<QbftFork> qbftForks) {
|
||||
|
||||
final MiningConfiguration miningParams =
|
||||
final MiningConfiguration miningConfiguration =
|
||||
ImmutableMiningConfiguration.builder()
|
||||
.mutableInitValues(
|
||||
MutableInitValues.builder()
|
||||
@@ -445,7 +445,8 @@ public class TestContextBuilder {
|
||||
|
||||
final BftValidatorOverrides validatorOverrides = convertBftForks(qbftForks);
|
||||
final TransactionSimulator transactionSimulator =
|
||||
new TransactionSimulator(blockChain, worldStateArchive, protocolSchedule, 0L);
|
||||
new TransactionSimulator(
|
||||
blockChain, worldStateArchive, protocolSchedule, miningConfiguration, 0L);
|
||||
|
||||
final BlockValidatorProvider blockValidatorProvider =
|
||||
BlockValidatorProvider.forkingValidatorProvider(
|
||||
@@ -496,7 +497,7 @@ public class TestContextBuilder {
|
||||
protocolContext,
|
||||
protocolSchedule,
|
||||
forksSchedule,
|
||||
miningParams,
|
||||
miningConfiguration,
|
||||
localAddress,
|
||||
BFT_EXTRA_DATA_ENCODER,
|
||||
ethScheduler);
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
package org.hyperledger.besu.consensus.qbft.validator;
|
||||
|
||||
import org.hyperledger.besu.datatypes.Address;
|
||||
import org.hyperledger.besu.ethereum.mainnet.ImmutableTransactionValidationParams;
|
||||
import org.hyperledger.besu.ethereum.mainnet.TransactionValidationParams;
|
||||
import org.hyperledger.besu.ethereum.transaction.CallParameter;
|
||||
import org.hyperledger.besu.ethereum.transaction.TransactionSimulator;
|
||||
@@ -94,10 +93,7 @@ public class ValidatorContractController {
|
||||
final CallParameter callParams =
|
||||
new CallParameter(null, contractAddress, -1, null, null, payload);
|
||||
final TransactionValidationParams transactionValidationParams =
|
||||
ImmutableTransactionValidationParams.builder()
|
||||
.from(TransactionValidationParams.transactionSimulator())
|
||||
.isAllowExceedingBalance(true)
|
||||
.build();
|
||||
TransactionValidationParams.transactionSimulatorAllowExceedingBalance();
|
||||
return transactionSimulator.process(
|
||||
callParams, transactionValidationParams, OperationTracer.NO_TRACING, blockNumber);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user