core/systemcontracts: use vm.StateDB in UpgradeBuildInSystemContract#2578
Merged
zzzckck merged 3 commits intobnb-chain:developfrom Aug 13, 2024
Merged
core/systemcontracts: use vm.StateDB in UpgradeBuildInSystemContract#2578zzzckck merged 3 commits intobnb-chain:developfrom
zzzckck merged 3 commits intobnb-chain:developfrom
Conversation
Kutasy
approved these changes
Jul 14, 2024
Kutasy
reviewed
Jul 14, 2024
| "strings" | ||
|
|
||
| "github.com/ethereum/go-ethereum/common" | ||
| "github.com/ethereum/go-ethereum/core/state" |
There was a problem hiding this comment.
0x5B8cDe74766c1d05a2a9047BC9D47AAFbCd4F9fE
buddh0
previously approved these changes
Jul 15, 2024
Contributor
|
for easily integrated with opBNB, which implement another StateDB struct |
zzzckck
reviewed
Jul 16, 2024
core/systemcontracts/upgrade.go
Outdated
|
|
||
| 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 { |
Collaborator
There was a problem hiding this comment.
would break this code "statedb == nil",
Contributor
There was a problem hiding this comment.
@easyfold pls add a unit test for the senario to pass nil interface
buddh0
approved these changes
Aug 8, 2024
zzzckck
approved these changes
Aug 13, 2024
This was referenced Aug 27, 2024
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: