use of org.hyperledger.besu.ethereum.api.jsonrpc.internal.methods.EthGetFilterChanges in project besu by hyperledger.
the class EthGetFilterChangesIntegrationTest method setUp.
@BeforeEach
public void setUp() {
final ExecutionContextTestFixture executionContext = ExecutionContextTestFixture.create();
blockchain = executionContext.getBlockchain();
transactions = new GasPricePendingTransactionsSorter(TransactionPoolConfiguration.DEFAULT_TX_RETENTION_HOURS, MAX_TRANSACTIONS, TestClock.fixed(), metricsSystem, blockchain::getChainHeadHeader, TransactionPoolConfiguration.DEFAULT_PRICE_BUMP);
final ProtocolContext protocolContext = executionContext.getProtocolContext();
EthContext ethContext = mock(EthContext.class);
EthPeers ethPeers = mock(EthPeers.class);
when(ethContext.getEthPeers()).thenReturn(ethPeers);
transactionPool = new TransactionPool(transactions, executionContext.getProtocolSchedule(), protocolContext, batchAddedListener, ethContext, new MiningParameters.Builder().minTransactionGasPrice(Wei.ZERO).build(), metricsSystem, TransactionPoolConfiguration.DEFAULT);
final BlockchainQueries blockchainQueries = new BlockchainQueries(blockchain, protocolContext.getWorldStateArchive());
filterManager = new FilterManagerBuilder().blockchainQueries(blockchainQueries).transactionPool(transactionPool).build();
method = new EthGetFilterChanges(filterManager);
}
use of org.hyperledger.besu.ethereum.api.jsonrpc.internal.methods.EthGetFilterChanges in project besu by hyperledger.
the class EthGetFilterChangesIntegrationTest method setUp.
@BeforeEach
public void setUp() {
final ExecutionContextTestFixture executionContext = ExecutionContextTestFixture.create();
blockchain = executionContext.getBlockchain();
transactions = new BaseFeePendingTransactionsSorter(TransactionPoolConfiguration.DEFAULT_TX_RETENTION_HOURS, MAX_TRANSACTIONS, TestClock.fixed(), metricsSystem, blockchain::getChainHeadHeader, TransactionPoolConfiguration.DEFAULT_PRICE_BUMP);
final ProtocolContext protocolContext = executionContext.getProtocolContext();
EthContext ethContext = mock(EthContext.class);
EthPeers ethPeers = mock(EthPeers.class);
when(ethContext.getEthPeers()).thenReturn(ethPeers);
transactionPool = new TransactionPool(transactions, executionContext.getProtocolSchedule(), protocolContext, batchAddedListener, ethContext, new MiningParameters.Builder().minTransactionGasPrice(Wei.ZERO).build(), metricsSystem, TransactionPoolConfiguration.DEFAULT);
final BlockchainQueries blockchainQueries = new BlockchainQueries(blockchain, protocolContext.getWorldStateArchive());
filterManager = new FilterManagerBuilder().blockchainQueries(blockchainQueries).transactionPool(transactionPool).build();
method = new EthGetFilterChanges(filterManager);
}
Aggregations