diff options
author | obscuren <geffobscura@gmail.com> | 2014-12-02 03:18:09 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-12-02 03:18:09 +0800 |
commit | 6dc46d3341dc5fa25bd005f9606de258874139be (patch) | |
tree | 39b5d7dad5a943de4e187f99c93da5aa7fc9f2b8 /state | |
parent | a3559c5e1b469890bb8d71e9992175febaae31c7 (diff) | |
download | go-tangerine-6dc46d3341dc5fa25bd005f9606de258874139be.tar.gz go-tangerine-6dc46d3341dc5fa25bd005f9606de258874139be.tar.zst go-tangerine-6dc46d3341dc5fa25bd005f9606de258874139be.zip |
Changed the way transactions are being added to the transaction pool
Diffstat (limited to 'state')
-rw-r--r-- | state/state.go | 3 | ||||
-rw-r--r-- | state/state_object.go | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/state/state.go b/state/state.go index 0a7f717fe..732a1192b 100644 --- a/state/state.go +++ b/state/state.go @@ -249,7 +249,6 @@ func (s *State) Reset() { continue } - //stateObject.state.Reset() stateObject.Reset() } @@ -281,6 +280,7 @@ func (self *State) Update(gasUsed *big.Int) { var deleted bool // Refund any gas that's left + // XXX THIS WILL CHANGE IN POC8 uhalf := new(big.Int).Div(gasUsed, ethutil.Big2) for addr, refs := range self.refund { for _, ref := range refs { @@ -289,6 +289,7 @@ func (self *State) Update(gasUsed *big.Int) { self.GetStateObject([]byte(addr)).AddBalance(refund.Mul(refund, ref.price)) } } + self.refund = make(map[string][]refund) for _, stateObject := range self.stateObjects { if stateObject.remove { diff --git a/state/state_object.go b/state/state_object.go index 5ce74c434..8aa126785 100644 --- a/state/state_object.go +++ b/state/state_object.go @@ -214,7 +214,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 { |