Skip to content

Commit

Permalink
fix BeaconBlockRootHandlerTests
Browse files Browse the repository at this point in the history
  • Loading branch information
yerke26 committed Oct 28, 2024
1 parent 68e5ab2 commit a4422b9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public void Test_StoreBeaconRoot_AccessListIsNull()
BlockHeader header = Build.A.BlockHeader.TestObject;
Block block = Build.A.Block.WithHeader(header).TestObject;

_beaconBlockRootHandler.StoreBeaconRoot(block, Cancun.Instance);
_beaconBlockRootHandler.StoreBeaconRoot(block, Cancun.Instance, NullTxTracer.Instance);

_transactionProcessor.DidNotReceive().Execute(Arg.Any<Transaction>(), Arg.Any<BlockExecutionContext>(), Arg.Any<ITxTracer>());
}
Expand All @@ -136,7 +136,7 @@ public void Test_StoreBeaconRoot_AccessListNotNull()
Block block = Build.A.Block.WithHeader(header).TestObject;
_worldState.AccountExists(Arg.Any<Address>()).Returns(true);

_beaconBlockRootHandler.StoreBeaconRoot(block, Cancun.Instance);
_beaconBlockRootHandler.StoreBeaconRoot(block, Cancun.Instance, NullTxTracer.Instance);

Transaction transaction = new()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
using Microsoft.CodeAnalysis;
using Nethermind.Blockchain.BeaconBlockRoot;
using Nethermind.Core.Specs;
using Nethermind.Evm.Tracing;

namespace Nethermind.Merge.Plugin.Test
{
Expand Down Expand Up @@ -154,7 +155,7 @@ private static ExecutionPayloadV4 CreateBlockRequestV4(MergeTestBlockchain chain
blockRequestV4.TryGetBlock(out Block? block);

var beaconBlockRootHandler = new BeaconBlockRootHandler(chain.TxProcessor, chain.WorldStateManager.GlobalWorldState);
beaconBlockRootHandler.StoreBeaconRoot(block!, chain.SpecProvider.GetSpec(block!.Header));
beaconBlockRootHandler.StoreBeaconRoot(block!, chain.SpecProvider.GetSpec(block!.Header), NullTxTracer.Instance);
Snapshot before = chain.State.TakeSnapshot();
var blockHashStore = new BlockhashStore(chain.SpecProvider, chain.State);
blockHashStore.ApplyBlockhashStateChanges(block!.Header);
Expand Down

0 comments on commit a4422b9

Please sign in to comment.