Skip to content

Commit

Permalink
add Witness to block and set ShouldVerifyIncomingWitness = true
Browse files Browse the repository at this point in the history
  • Loading branch information
yerke26 committed Sep 30, 2024
1 parent c49c474 commit 506fa2c
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ protected async Task<EthereumTestResult> RunTest(BlockchainTest test, Stopwatch?
specProvider,
_logManager);

IBlockProcessor blockProcessor = new BlockProcessor(
BlockProcessor blockProcessor = new BlockProcessor(
specProvider,
blockValidator,
rewardCalculator,
Expand All @@ -152,6 +152,7 @@ protected async Task<EthereumTestResult> RunTest(BlockchainTest test, Stopwatch?
NullWitnessCollector.Instance,
blockTree,
_logManager);
blockProcessor.ShouldVerifyIncomingWitness = true;

IBlockchainProcessor blockchainProcessor = new BlockchainProcessor(
blockTree,
Expand Down Expand Up @@ -255,6 +256,11 @@ protected async Task<EthereumTestResult> RunTest(BlockchainTest test, Stopwatch?
Assert.That(suggestedBlock.Uncles[uncleIndex].Hash, Is.EqualTo(new Hash256(testBlockJson.UncleHeaders[uncleIndex].Hash)));
}

if (testBlockJson.Witness is not null)
{
suggestedBlock.Body.ExecutionWitness = testBlockJson.Witness;
}

correctRlp.Add((suggestedBlock, testBlockJson.ExpectedException));
}
}
Expand Down

0 comments on commit 506fa2c

Please sign in to comment.