Skip to content
This repository has been archived by the owner on Apr 4, 2022. It is now read-only.

Commit

Permalink
[core/state_transition.go] Restore backward compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszmatczak committed Sep 10, 2019
1 parent 3e6f5a6 commit df78718
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions core/state_transition.go
Expand Up @@ -140,6 +140,12 @@ func (st *StateTransition) to() common.Address {
if st.msg == nil || st.msg.To() == nil /* contract creation */ {
return common.Address{}
}

to := st.msg.To()
if !st.state.Exist(*to) && !st.env.RuleSet().IsAtlantis(st.env.BlockNumber()) { // for backward compatibility with webchain before full Atlantis hardfork
st.state.CreateAccount(*to)
}

return *st.msg.To()
}

Expand Down

0 comments on commit df78718

Please sign in to comment.