Skip to content

Commit

Permalink
Fix tx registration order (#7668)
Browse files Browse the repository at this point in the history
Co-authored-by: Ben Adams <thundercat@illyriad.co.uk>
  • Loading branch information
flcl42 and benaadams authored Oct 28, 2024
1 parent 0263fed commit 756ddc2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public async Task<ResultWrapper<PayloadStatusV1>> HandleAsync(ExecutionPayload r
{
if (!_blockValidator.ValidateSuggestedBlock(block, out string? error, validateHashes: false))
{
if (_logger.IsWarn) _logger.Warn(InvalidBlockHelper.GetMessage(block, "suggested block is invalid"));
if (_logger.IsWarn) _logger.Warn(InvalidBlockHelper.GetMessage(block, $"suggested block is invalid, {error}"));
return NewPayloadV1Result.Invalid(error);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ public class InitializeBlockchainOptimism(OptimismNethermindApi api) : Initializ

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

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

await base.InitBlockchain();

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

protected override ITransactionProcessor CreateTransactionProcessor(CodeInfoRepository codeInfoRepository, VirtualMachine virtualMachine)
Expand Down

0 comments on commit 756ddc2

Please sign in to comment.