aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-12-04 19:43:12 +0800
committerobscuren <geffobscura@gmail.com>2014-12-04 19:43:12 +0800
commit008e91db6a776303e605808ba840d92bb16d69ca (patch)
tree3970b7958827c2fcc9d3dcd8a0be3e6e586290cf /core
parent3043b233ea4df9b630638d75f3589b94653ccfa9 (diff)
downloaddexon-008e91db6a776303e605808ba840d92bb16d69ca.tar
dexon-008e91db6a776303e605808ba840d92bb16d69ca.tar.gz
dexon-008e91db6a776303e605808ba840d92bb16d69ca.tar.bz2
dexon-008e91db6a776303e605808ba840d92bb16d69ca.tar.lz
dexon-008e91db6a776303e605808ba840d92bb16d69ca.tar.xz
dexon-008e91db6a776303e605808ba840d92bb16d69ca.tar.zst
dexon-008e91db6a776303e605808ba840d92bb16d69ca.zip
null ptr fix
Diffstat (limited to 'core')
-rw-r--r--core/state_transition.go7
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)