aboutsummaryrefslogtreecommitdiffstats
path: root/ethchain/state_manager.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-06-12 17:19:32 +0800
committerobscuren <geffobscura@gmail.com>2014-06-12 17:19:32 +0800
commitb855e5f7df194c84651d7cc7ee32d307a2fa0a2e (patch)
treee4a87b6d81fb7c01963713cb1cc647d1327eca16 /ethchain/state_manager.go
parent6593c6942454233f61d7d74f030a9075a84807cd (diff)
downloaddexon-b855e5f7df194c84651d7cc7ee32d307a2fa0a2e.tar
dexon-b855e5f7df194c84651d7cc7ee32d307a2fa0a2e.tar.gz
dexon-b855e5f7df194c84651d7cc7ee32d307a2fa0a2e.tar.bz2
dexon-b855e5f7df194c84651d7cc7ee32d307a2fa0a2e.tar.lz
dexon-b855e5f7df194c84651d7cc7ee32d307a2fa0a2e.tar.xz
dexon-b855e5f7df194c84651d7cc7ee32d307a2fa0a2e.tar.zst
dexon-b855e5f7df194c84651d7cc7ee32d307a2fa0a2e.zip
Changed opcode numbers and added missing opcodes
Diffstat (limited to 'ethchain/state_manager.go')
-rw-r--r--ethchain/state_manager.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/ethchain/state_manager.go b/ethchain/state_manager.go
index 9631b55fe..7b44ba3b8 100644
--- a/ethchain/state_manager.go
+++ b/ethchain/state_manager.go
@@ -166,13 +166,9 @@ func (self *StateManager) ProcessTransaction(tx *Transaction, coinbase *StateObj
// Subtract the amount from the senders account
sender.SubAmount(totAmount)
- fmt.Printf("state root after sender update %x\n", state.Root())
-
// Add the amount to receivers account which should conclude this transaction
receiver.AddAmount(tx.Value)
state.UpdateStateObject(receiver)
-
- fmt.Printf("state root after receiver update %x\n", state.Root())
}
state.UpdateStateObject(sender)
@@ -215,6 +211,8 @@ func (sm *StateManager) ApplyTransactions(coinbase []byte, state *State, block *
validTxs = append(validTxs, tx)
}
+ fmt.Println("################# MADE\n", receipts, "\n############################")
+
// Update the total gas used for the block (to be mined)
block.GasUsed = totalUsedGas
@@ -250,6 +248,7 @@ func (sm *StateManager) ApplyTransaction(coinbase []byte, state *State, block *B
// as it's data provider.
contract := sm.MakeStateObject(state, tx)
if contract != nil {
+ fmt.Println(Disassemble(contract.Init()))
// Evaluate the initialization script
// and use the return value as the
// script section for the state object.
@@ -323,6 +322,7 @@ func (sm *StateManager) ProcessBlock(state *State, parent, block *Block, dontRea
if !sm.bc.HasBlock(block.PrevHash) && sm.bc.CurrentBlock != nil {
return ParentError(block.PrevHash)
}
+ fmt.Println(block.Receipts())
// Process the transactions on to current block
sm.ApplyTransactions(block.Coinbase, state, parent, block.Transactions())