diff options
Diffstat (limited to 'state/state_object.go')
-rw-r--r-- | state/state_object.go | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/state/state_object.go b/state/state_object.go index f02d1b5ab..b8af4e702 100644 --- a/state/state_object.go +++ b/state/state_object.go @@ -35,7 +35,7 @@ type StateObject struct { codeHash []byte Nonce uint64 // Contract related attributes - State *State + State *StateDB Code Code InitCode Code @@ -212,7 +212,7 @@ func (c *StateObject) ConvertGas(gas, price *big.Int) error { func (self *StateObject) SetGasPool(gasLimit *big.Int) { self.gasPool = new(big.Int).Set(gasLimit) - statelogger.DebugDetailf("%x: fuel (+ %v)", self.Address(), self.gasPool) + statelogger.Debugf("%x: gas (+ %v)", self.Address(), self.gasPool) } func (self *StateObject) BuyGas(gas, price *big.Int) error { @@ -276,15 +276,14 @@ func (c *StateObject) Init() Code { return c.InitCode } -// To satisfy ClosureRef -func (self *StateObject) Object() *StateObject { - return self -} - func (self *StateObject) Root() []byte { return self.State.Trie.GetRoot() } +func (self *StateObject) SetCode(code []byte) { + self.Code = code +} + // // Encoding // |