Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
asdacap committed Dec 5, 2023
1 parent 2aff001 commit 3c17a68
Show file tree
Hide file tree
Showing 13 changed files with 19 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ protected override IBlockProducer CreateTestBlockProducer(TxPoolTxSource txPoolT
SpecProvider.UpdateMergeTransitionInfo(1, 0);

BlockProducerEnvFactory blockProducerEnvFactory = new BlockProducerEnvFactory(
_readOnlyWorldStateManager,
WorldStateManager,
BlockTree,
SpecProvider,
BlockValidator,
Expand Down Expand Up @@ -211,7 +211,7 @@ protected override BlockProcessor CreateBlockProcessor()
UserOperationSimulator[entryPoint] = new(
UserOperationTxBuilder[entryPoint],
ReadOnlyState,
new ReadOnlyTxProcessingEnvFactory(_readOnlyWorldStateManager, BlockTree, SpecProvider, LogManager),
new ReadOnlyTxProcessingEnvFactory(WorldStateManager, BlockTree, SpecProvider, LogManager),
EntryPointContractAbi,
entryPoint!,
WhitelistedPayamsters,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ protected override BlockProcessor CreateBlockProcessor()
KeyValuePair<long, Address> blockGasLimitContractTransition = ChainSpec.AuRa.BlockGasLimitContractTransitions.First();
BlockGasLimitContract gasLimitContract = new(AbiEncoder.Instance, blockGasLimitContractTransition.Value, blockGasLimitContractTransition.Key,
new ReadOnlyTxProcessingEnv(
_readOnlyWorldStateManager,
WorldStateManager,
BlockTree, SpecProvider, LimboLogs.Instance));

GasLimitOverrideCache = new AuRaContractGasLimitOverride.Cache();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ protected override TxPoolTxSource CreateTxPoolTxSource()
TxPoolTxSource txPoolTxSource = base.CreateTxPoolTxSource();

TxPriorityContract = new TxPriorityContract(AbiEncoder.Instance, TestItem.AddressA,
new ReadOnlyTxProcessingEnv(_readOnlyWorldStateManager, BlockTree, SpecProvider, LimboLogs.Instance));
new ReadOnlyTxProcessingEnv(WorldStateManager, BlockTree, SpecProvider, LimboLogs.Instance));

Priorities = new DictionaryContractDataStore<TxPriorityContract.Destination>(
new TxPriorityContract.DestinationSortedListContractDataStoreCollection(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ protected override BlockProcessor CreateBlockProcessor()
{
AbiEncoder abiEncoder = AbiEncoder.Instance;
ReadOnlyTransactionProcessorSource = new ReadOnlyTxProcessingEnv(
_readOnlyWorldStateManager,
WorldStateManager,
BlockTree, SpecProvider,
LimboLogs.Instance);
RegisterContract = new RegisterContract(abiEncoder, ChainSpec.Parameters.Registrar, ReadOnlyTransactionProcessorSource);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,13 +276,13 @@ protected override BlockProcessor CreateBlockProcessor()

IReadOnlyTrieStore trieStore = new TrieStore(DbProvider.StateDb, LimboLogs.Instance).AsReadOnly();
IReadOnlyTxProcessorSource txProcessorSource = new ReadOnlyTxProcessingEnv(
_readOnlyWorldStateManager,
WorldStateManager,
BlockTree,
SpecProvider,
LimboLogs.Instance);

VersionedTransactionPermissionContract transactionPermissionContract = new(AbiEncoder.Instance, _contractAddress, 1,
new ReadOnlyTxProcessingEnv(_readOnlyWorldStateManager, BlockTree, SpecProvider, LimboLogs.Instance), TransactionPermissionContractVersions, LimboLogs.Instance, SpecProvider);
new ReadOnlyTxProcessingEnv(WorldStateManager, BlockTree, SpecProvider, LimboLogs.Instance), TransactionPermissionContractVersions, LimboLogs.Instance, SpecProvider);

TxPermissionFilterCache = new PermissionBasedTxFilter.Cache();
PermissionBasedTxFilter = new PermissionBasedTxFilter(transactionPermissionContract, TxPermissionFilterCache, LimboLogs.Instance);
Expand Down
2 changes: 1 addition & 1 deletion src/Nethermind/Nethermind.Init/InitializeStateDb.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
namespace Nethermind.Init;

[RunnerStepDependencies(typeof(InitializePlugins), typeof(InitializeBlockTree), typeof(SetupKeyStore))]
public class InitializeStateDb: IStep
public class InitializeStateDb : IStep
{
private readonly INethermindApi _api;
private ILogger? _logger;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ protected override async Task<TestBlockchain> Build(ISpecProvider? specProvider
IFilterManager filterManager = new FilterManager(filterStore, BlockProcessor, TxPool, LimboLogs.Instance);

ReadOnlyTxProcessingEnv processingEnv = new(
_readOnlyWorldStateManager,
WorldStateManager,
new ReadOnlyBlockTree(BlockTree),
SpecProvider,
LimboLogs.Instance);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public async Task Build(ISpecProvider? specProvider = null, bool isAura = false)
new(Blockchain.EthereumEcdsa, Blockchain.SpecProvider);
IReceiptFinder receiptFinder = new FullInfoReceiptFinder(Blockchain.ReceiptStorage, receiptsRecovery, Blockchain.BlockFinder);
ReadOnlyTxProcessingEnv txProcessingEnv =
new(Blockchain._readOnlyWorldStateManager, Blockchain.BlockTree.AsReadOnly(), Blockchain.SpecProvider, Blockchain.LogManager);
new(Blockchain.WorldStateManager, Blockchain.BlockTree.AsReadOnly(), Blockchain.SpecProvider, Blockchain.LogManager);
RewardCalculator rewardCalculatorSource = new(Blockchain.SpecProvider);

IRewardCalculator rewardCalculator = rewardCalculatorSource.Get(txProcessingEnv.TransactionProcessor);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ protected override IBlockProcessor CreateBlockProcessor()
{
BlockTree = BlockTree,
DbProvider = DbProvider,
WorldStateManager = _readOnlyWorldStateManager,
WorldStateManager = WorldStateManager,
SpecProvider = SpecProvider,
TransactionComparerProvider = TransactionComparerProvider,
TxPool = TxPool
Expand Down Expand Up @@ -157,7 +157,7 @@ protected override IBlockProducer CreateTestBlockProducer(TxPoolTxSource txPoolT
_api!,
new AuRaConfig(),
new DisposableStack(),
_readOnlyWorldStateManager,
WorldStateManager,
BlockTree,
SpecProvider,
BlockValidator,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ protected override IBlockProducer CreateTestBlockProducer(TxPoolTxSource txPoolT
targetAdjustedGasLimitCalculator);

BlockProducerEnvFactory blockProducerEnvFactory = new(
_readOnlyWorldStateManager!,
WorldStateManager!,
BlockTree,
SpecProvider,
BlockValidator,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ protected override IBlockProducer CreateTestBlockProducer(TxPoolTxSource txPoolT
SpecProvider.UpdateMergeTransitionInfo(1, 0);

BlockProducerEnvFactory blockProducerEnvFactory = new(
_readOnlyWorldStateManager,
WorldStateManager,
BlockTree,
SpecProvider,
BlockValidator,
Expand Down Expand Up @@ -205,7 +205,7 @@ protected override BlockProcessor CreateBlockProcessor()

_tracerFactory = new TracerFactory(
BlockTree,
_readOnlyWorldStateManager,
WorldStateManager,
BlockPreprocessorStep,
SpecProvider,
LogManager,
Expand Down
5 changes: 3 additions & 2 deletions src/Nethermind/Nethermind.State/ReadOnlyWorldStateManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace Nethermind.State;
/// <summary>
/// Mainly to make it easier for test
/// </summary>
public class ReadOnlyWorldStateManager: IWorldStateManager
public class ReadOnlyWorldStateManager : IWorldStateManager
{
private IReadOnlyTrieStore? _readOnlyTrieStore;
private ILogManager _logManager;
Expand Down Expand Up @@ -47,7 +47,8 @@ ILogManager logManager
{
readOnlyDbProvider.ClearTempChanges();
codeDb.ClearTempChanges();
});
}
);
}

public virtual event EventHandler<ReorgBoundaryReached>? ReorgBoundaryReached
Expand Down
2 changes: 1 addition & 1 deletion src/Nethermind/Nethermind.State/WorldStateManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace Nethermind.State;

public class WorldStateManager: ReadOnlyWorldStateManager
public class WorldStateManager : ReadOnlyWorldStateManager
{
private readonly IWorldState _worldState;
private readonly ITrieStore _trieStore;
Expand Down

0 comments on commit 3c17a68

Please sign in to comment.