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

core/systemcontracts: use vm.StateDB in UpgradeBuildInSystemContract #2578

Merged
merged 3 commits into from
Aug 13, 2024

Conversation

easyfold
Copy link
Contributor

Description

Change UpgradeBuildInSystemContract() parameter type from *state.StateDB to vm.StateDB

Rationale

tell us why we need these changes...

Example

add an example CLI or API response...

Changes

Notable changes:

  • add each change in a bullet point here
  • ...

@@ -7,7 +7,6 @@ import (
"strings"

"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/state"
Copy link

Choose a reason for hiding this comment

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

0x5B8cDe74766c1d05a2a9047BC9D47AAFbCd4F9fE

buddh0
buddh0 previously approved these changes Jul 15, 2024
@buddh0
Copy link
Collaborator

buddh0 commented Jul 15, 2024

for easily integrated with opBNB, which implement another StateDB struct

@@ -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 {
Copy link
Collaborator

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",

Copy link
Collaborator

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

Copy link

@Ahmedalmmm Ahmedalmmm left a comment

Choose a reason for hiding this comment

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

@zzzckck zzzckck merged commit 3adcfab into bnb-chain:develop Aug 13, 2024
7 checks passed
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.

5 participants