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

[R4R] correct logic for eip check of NewEVMInterpreter #953

Merged
merged 2 commits into from
Jun 24, 2022

Conversation

qinglin89
Copy link
Contributor

@qinglin89 qinglin89 commented Jun 20, 2022

Description

current code logic of for...range...check to delete elements in slice is not correct, would skip checking the element next to the element be deleted of which error was detected.

for i, v := range slice{
   // check slice[i]
    slice = append(slice[:i], slice[i+1:]...)
}

Rationale

declare a new slice for left eipIDs

Changes

core/vm/interpreter.go : NewEVMInterpreter(...)

core/vm/interpreter.go Outdated Show resolved Hide resolved
Copy link
Contributor

@setunapo setunapo left a comment

Choose a reason for hiding this comment

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

LGTM

@qinglin89
Copy link
Contributor Author

also submitted pr as etherum/go-ethereum#25131

@forcodedancing
Copy link
Contributor

LGTM

@brilliant-lx brilliant-lx merged commit 128977c into bnb-chain:develop Jun 24, 2022
This was referenced Jul 28, 2022
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

6 participants