Merge branch 'fix-state-transition' into 'master'

Fix state transition for pre-fork blocks

See merge request pulsechaincom/go-pulse!11
This commit is contained in:
sjb933 2021-08-31 22:24:41 +00:00
commit 9b25069d8b

View File

@ -277,7 +277,7 @@ func (st *StateTransition) TransitionDb() (*ExecutionResult, error) {
st.refundGas()
// consensus engine is parlia
if st.evm.ChainConfig().Parlia != nil {
if st.evm.ChainConfig().Parlia != nil && !st.evm.ChainConfig().PrimordialPulseAhead(st.evm.Context.BlockNumber) {
st.state.AddBalance(consensus.SystemAddress, new(big.Int).Mul(new(big.Int).SetUint64(st.gasUsed()), st.gasPrice))
} else {
st.state.AddBalance(st.evm.Context.Coinbase, new(big.Int).Mul(new(big.Int).SetUint64(st.gasUsed()), st.gasPrice))