aboutsummaryrefslogtreecommitdiffstats
path: root/ethchain/state_transition.go
diff options
context:
space:
mode:
Diffstat (limited to 'ethchain/state_transition.go')
-rw-r--r--ethchain/state_transition.go22
1 files changed, 2 insertions, 20 deletions
diff --git a/ethchain/state_transition.go b/ethchain/state_transition.go
index 23175b0f3..dc465bbbd 100644
--- a/ethchain/state_transition.go
+++ b/ethchain/state_transition.go
@@ -97,7 +97,6 @@ func (self *StateTransition) BuyGas() error {
if err != nil {
return err
}
- //self.state.UpdateStateObject(coinbase)
self.AddGas(self.tx.Gas)
sender.SubAmount(self.tx.GasValue())
@@ -115,7 +114,7 @@ func (self *StateTransition) RefundGas() {
}
func (self *StateTransition) TransitionState() (err error) {
- //snapshot := st.state.Snapshot()
+ ethutil.Config.Log.Printf(ethutil.LogLevelInfo, "(~) %x\n", self.tx.Hash())
/*
defer func() {
@@ -132,8 +131,6 @@ func (self *StateTransition) TransitionState() (err error) {
receiver *StateObject
)
- ethutil.Config.Log.Printf(ethutil.LogLevelInfo, "(~) %x\n", tx.Hash())
-
// Make sure this transaction's nonce is correct
if sender.Nonce != tx.Nonce {
return NonceError(tx.Nonce, sender.Nonce)
@@ -146,26 +143,11 @@ func (self *StateTransition) TransitionState() (err error) {
// XXX Transactions after this point are considered valid.
- defer func() {
- self.RefundGas()
-
- /*
- if sender != nil {
- self.state.UpdateStateObject(sender)
- }
-
- if receiver != nil {
- self.state.UpdateStateObject(receiver)
- }
-
- self.state.UpdateStateObject(self.Coinbase())
- */
- }()
+ defer self.RefundGas()
// Increment the nonce for the next transaction
sender.Nonce += 1
- // Get the receiver (TODO fix this, if coinbase is the receiver we need to save/retrieve)
receiver = self.Receiver()
// Transaction gas