-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
core/systemcontracts: use vm.StateDB in UpgradeBuildInSystemContract #2578
Conversation
@@ -7,7 +7,6 @@ import ( | |||
"strings" | |||
|
|||
"github.com/ethereum/go-ethereum/common" | |||
"github.com/ethereum/go-ethereum/core/state" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0x5B8cDe74766c1d05a2a9047BC9D47AAFbCd4F9fE
for easily integrated with opBNB, which implement another StateDB struct |
core/systemcontracts/upgrade.go
Outdated
@@ -738,7 +738,7 @@ func init() { | |||
} | |||
} | |||
|
|||
func UpgradeBuildInSystemContract(config *params.ChainConfig, blockNumber *big.Int, lastBlockTime uint64, blockTime uint64, statedb *state.StateDB) { | |||
func UpgradeBuildInSystemContract(config *params.ChainConfig, blockNumber *big.Int, lastBlockTime uint64, blockTime uint64, statedb vm.StateDB) { | |||
if config == nil || blockNumber == nil || statedb == nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would break this code "statedb == nil",
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@easyfold pls add a unit test for the senario to pass nil interface
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Description
Change
UpgradeBuildInSystemContract()
parameter type from *state.StateDB to vm.StateDBRationale
tell us why we need these changes...
Example
add an example CLI or API response...
Changes
Notable changes: