Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ak88 committed Sep 9, 2024
1 parent 68c3736 commit fc45531
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Nethermind/Nethermind.TxPool.Test/TxPoolTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1697,7 +1697,7 @@ public void Should_correctly_add_tx_to_local_pool_when_underpaid([Values] TxType
yield return ([..Eip7702Constants.DelegationHeader, ..new byte[20]], AcceptTxResult.Accepted);
}
[TestCaseSource(nameof(CodeCases))]
public void SubmitTx_((byte[] code, AcceptTxResult expected) testCase)
public void SubmitTx_CodeIsNotDelegationAndDelegation_DelegationIsAccepted((byte[] code, AcceptTxResult expected) testCase)
{
ISpecProvider specProvider = GetPragueSpecProvider();
TxPoolConfig txPoolConfig = new TxPoolConfig { Size = 30, PersistentBlobStorageSize = 0 };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ internal sealed class DeployedCodeFilter(IWorldState worldState, ICodeInfoReposi
{
public AcceptTxResult Accept(Transaction tx, ref TxFilteringState state, TxHandlingOptions txHandlingOptions)
{
return specProvider.GetCurrentHeadSpec().IsEip3607Enabled && state.SenderAccount.HasCode && (!specProvider.GetCurrentHeadSpec().IsEip7702Enabled || !codeInfoRepository.IsDelegation(worldState, tx.SenderAddress!, out _))
return specProvider.GetCurrentHeadSpec().IsEip3607Enabled
&& state.SenderAccount.HasCode
&& (!specProvider.GetCurrentHeadSpec().IsEip7702Enabled ||
!codeInfoRepository.IsDelegation(worldState, tx.SenderAddress!, out _))
? AcceptTxResult.SenderIsContract
: AcceptTxResult.Accepted;
}
Expand Down

0 comments on commit fc45531

Please sign in to comment.