|
|
@ -24,7 +24,6 @@ import ( |
|
|
|
|
|
|
|
|
|
|
|
"github.com/ethereum/go-ethereum/common" |
|
|
|
"github.com/ethereum/go-ethereum/common" |
|
|
|
"github.com/ethereum/go-ethereum/crypto" |
|
|
|
"github.com/ethereum/go-ethereum/crypto" |
|
|
|
"github.com/ethereum/go-ethereum/log" |
|
|
|
|
|
|
|
"github.com/ethereum/go-ethereum/rlp" |
|
|
|
"github.com/ethereum/go-ethereum/rlp" |
|
|
|
"github.com/ethereum/go-ethereum/trie" |
|
|
|
"github.com/ethereum/go-ethereum/trie" |
|
|
|
) |
|
|
|
) |
|
|
@ -134,9 +133,6 @@ func (self *stateObject) markSuicided() { |
|
|
|
self.onDirty(self.Address()) |
|
|
|
self.onDirty(self.Address()) |
|
|
|
self.onDirty = nil |
|
|
|
self.onDirty = nil |
|
|
|
} |
|
|
|
} |
|
|
|
log.Debug("", "msg", log.Lazy{Fn: func() string { |
|
|
|
|
|
|
|
return fmt.Sprintf("%x: #%d %v X\n", self.Address(), self.Nonce(), self.Balance()) |
|
|
|
|
|
|
|
}}) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (c *stateObject) touch() { |
|
|
|
func (c *stateObject) touch() { |
|
|
@ -251,10 +247,6 @@ func (c *stateObject) AddBalance(amount *big.Int) { |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
c.SetBalance(new(big.Int).Add(c.Balance(), amount)) |
|
|
|
c.SetBalance(new(big.Int).Add(c.Balance(), amount)) |
|
|
|
|
|
|
|
|
|
|
|
log.Debug("", "msg", log.Lazy{Fn: func() string { |
|
|
|
|
|
|
|
return fmt.Sprintf("%x: #%d %v (+ %v)\n", c.Address(), c.Nonce(), c.Balance(), amount) |
|
|
|
|
|
|
|
}}) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// SubBalance removes amount from c's balance.
|
|
|
|
// SubBalance removes amount from c's balance.
|
|
|
@ -264,10 +256,6 @@ func (c *stateObject) SubBalance(amount *big.Int) { |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
c.SetBalance(new(big.Int).Sub(c.Balance(), amount)) |
|
|
|
c.SetBalance(new(big.Int).Sub(c.Balance(), amount)) |
|
|
|
|
|
|
|
|
|
|
|
log.Debug("", "msg", log.Lazy{Fn: func() string { |
|
|
|
|
|
|
|
return fmt.Sprintf("%x: #%d %v (- %v)\n", c.Address(), c.Nonce(), c.Balance(), amount) |
|
|
|
|
|
|
|
}}) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (self *stateObject) SetBalance(amount *big.Int) { |
|
|
|
func (self *stateObject) SetBalance(amount *big.Int) { |
|
|
|