Skip to content

Commit

Permalink
Fix OP initialization order (#7487)
Browse files Browse the repository at this point in the history
  • Loading branch information
flcl42 authored Sep 25, 2024
1 parent 76642cc commit a93a747
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
using Nethermind.Evm;
using Nethermind.Evm.TransactionProcessing;
using Nethermind.Init.Steps;
using Nethermind.Logging;
using Nethermind.Merge.Plugin.InvalidChainTracker;

namespace Nethermind.Optimism;
Expand All @@ -24,14 +23,14 @@ public class InitializeBlockchainOptimism(OptimismNethermindApi api) : Initializ
{
private readonly IBlocksConfig _blocksConfig = api.Config<IBlocksConfig>();

protected override Task InitBlockchain()
protected override async Task InitBlockchain()
{
api.RegisterTxType(TxType.DepositTx, new OptimismTxDecoder<Transaction>(), Always.Valid);

api.SpecHelper = new(api.ChainSpec.Optimism);
api.L1CostHelper = new(api.SpecHelper, api.ChainSpec.Optimism.L1BlockAddress);

return base.InitBlockchain();
await base.InitBlockchain();

api.RegisterTxType(TxType.DepositTx, new OptimismTxDecoder<Transaction>(), Always.Valid);
}

protected override ITransactionProcessor CreateTransactionProcessor(CodeInfoRepository codeInfoRepository, VirtualMachine virtualMachine)
Expand Down
2 changes: 0 additions & 2 deletions src/Nethermind/Nethermind.Optimism/OptimismPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
using Nethermind.Specs.ChainSpecStyle;
using Nethermind.Serialization.Rlp;
using Nethermind.Optimism.Rpc;
using Nethermind.Core;
using Nethermind.JsonRpc.Modules.Eth;
using Nethermind.Merge.Plugin.handlers;

namespace Nethermind.Optimism;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
using Nethermind.JsonRpc;
using Nethermind.Blockchain.Find;
using Nethermind.Int256;
using System.Threading.Tasks;
using Nethermind.Facade.Eth;

namespace Nethermind.Optimism.Rpc;

Expand Down

0 comments on commit a93a747

Please sign in to comment.