-
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: include BEP-319 on kepler hardfork #1973
Conversation
675f7a6
to
54b4257
Compare
54b4257
to
e9c83f0
Compare
f73f8e9
to
a9e9b1e
Compare
a9e9b1e
to
345e11c
Compare
345e11c
to
c31a2ac
Compare
@@ -74,7 +74,11 @@ func (p *StateProcessor) Process(block *types.Block, statedb *state.StateDB, cfg | |||
misc.ApplyDAOHardFork(statedb) | |||
} | |||
// Handle upgrade build-in system contract code | |||
systemcontracts.UpgradeBuildInSystemContract(p.config, block.Number(), statedb) | |||
lastBlock := p.bc.GetBlockByHash(block.ParentHash()) | |||
if lastBlock == 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.
Just thinking about edge case here, there is no need to check if the block itself is nil similar to how we are checking its parent to be 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.
the parent may be pruned.
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.
Yes but the block itself is always non-nil in this case right?
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.
yes. there is only two places call the func Process
,except in test cases
and they all check block to be non-nill before calling Process
Description
core/systemcontracts: include BEP-319 on kepler hardfork
Rationale
two contents in kepler hard fork
related code is implemented in bsc-genesis-contract
Example
add an example CLI or API response...
Changes
Notable changes: