diff options
author | obscuren <geffobscura@gmail.com> | 2014-12-04 19:43:12 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-12-04 19:43:12 +0800 |
commit | 008e91db6a776303e605808ba840d92bb16d69ca (patch) | |
tree | 3970b7958827c2fcc9d3dcd8a0be3e6e586290cf /core/state_transition.go | |
parent | 3043b233ea4df9b630638d75f3589b94653ccfa9 (diff) | |
download | go-tangerine-008e91db6a776303e605808ba840d92bb16d69ca.tar.gz go-tangerine-008e91db6a776303e605808ba840d92bb16d69ca.tar.zst go-tangerine-008e91db6a776303e605808ba840d92bb16d69ca.zip |
null ptr fix
Diffstat (limited to 'core/state_transition.go')
-rw-r--r-- | core/state_transition.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/core/state_transition.go b/core/state_transition.go index 3c45ddbf9..820ba66e6 100644 --- a/core/state_transition.go +++ b/core/state_transition.go @@ -141,9 +141,8 @@ func (self *StateTransition) TransitionState() (err error) { } var ( - tx = self.tx - sender = self.Sender() - receiver *state.StateObject + tx = self.tx + sender = self.Sender() ) defer self.RefundGas() @@ -175,7 +174,7 @@ func (self *StateTransition) TransitionState() (err error) { if tx.CreatesContract() { self.rec = MakeContract(tx, self.state) - ret, err, ref = vmenv.Create(sender, receiver.Address(), self.tx.Data, self.gas, self.gasPrice, self.value) + ret, err, ref = vmenv.Create(sender, self.rec.Address(), self.tx.Data, self.gas, self.gasPrice, self.value) ref.SetCode(ret) } else { ret, err = vmenv.Call(self.Sender(), self.Receiver().Address(), self.tx.Data, self.gas, self.gasPrice, self.value) |