Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix accesList handling on Transactions #6031

Merged
merged 7 commits into from
Aug 24, 2023
Merged

Conversation

emlautarom1
Copy link
Contributor

@emlautarom1 emlautarom1 commented Aug 22, 2023

Partially addresses #5161

Changes

  • Fix accessList handling on Transactions (Generic, Singed Legacy, Signed 2930 and Signed 1559)

Types of changes

What types of changes does your code introduce?

  • Bugfix (a non-breaking change that fixes an issue)
  • New feature (a non-breaking change that adds functionality)
  • Breaking change (a change that causes existing functionality not to work as expected)
  • Optimization
  • Refactoring
  • Documentation update
  • Build-related changes
  • Other: Description

Testing

Requires testing

  • Yes
  • No

If yes, did you write tests?

  • Yes
  • No

Documentation

Requires documentation update

  • Yes
  • No

Requires explanation in Release Notes

  • Yes
  • No

- Legacy does not have an `AccessList` field
- Others have an `AccessList` field and should be at least an empty array
- Can create issues if we don't properly reset the field
Comment on lines +41 to +48
if (transaction.SupportsAccessList)
{
AccessList = transaction.AccessList is null ? Array.Empty<AccessListItemForRpc>() : AccessListItemForRpc.FromAccessList(transaction.AccessList);
}
else
{
AccessList = null;
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Main change for this PR: when a Tx supports accessList then AccessList should be non-null; otherwise the field should be always null.

@emlautarom1 emlautarom1 self-assigned this Aug 23, 2023
@emlautarom1 emlautarom1 merged commit b65ef6a into master Aug 24, 2023
61 checks passed
@emlautarom1 emlautarom1 deleted the fix/get_block_inconsistency branch August 24, 2023 13:53
@emlautarom1 emlautarom1 restored the fix/get_block_inconsistency branch August 24, 2023 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants