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

graphql: add storage slots to access list #23650

Merged
merged 2 commits into from Sep 28, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 5 additions & 1 deletion graphql/graphql.go
Expand Up @@ -440,9 +440,13 @@ func (t *Transaction) AccessList(ctx context.Context) (*[]*AccessTuple, error) {
accessList := tx.AccessList()
ret := make([]*AccessTuple, 0, len(accessList))
for _, al := range accessList {
var sKeys []common.Hash
Copy link
Member

Choose a reason for hiding this comment

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

al := al would also fix it

Copy link
Contributor

Choose a reason for hiding this comment

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

Would be even better to change the type of AccessTuple.storageKeys to non-pointer.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed, PTAL

for _, h := range al.StorageKeys {
sKeys = append(sKeys, h)
}
ret = append(ret, &AccessTuple{
address: al.Address,
storageKeys: &al.StorageKeys,
storageKeys: &sKeys,
})
}
return &ret, nil
Expand Down