diff options
author | obscuren <geffobscura@gmail.com> | 2014-03-21 18:16:41 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-03-21 18:16:41 +0800 |
commit | 0db86e4485176aff7c45f0ce673174ec8407c0fc (patch) | |
tree | 747db9bfe82beb0d7d455b964d666da9162daac0 /ethereum.go | |
parent | 85e04476845a5a41836824b133d939faf4e1c3fa (diff) | |
download | go-tangerine-0db86e4485176aff7c45f0ce673174ec8407c0fc.tar.gz go-tangerine-0db86e4485176aff7c45f0ce673174ec8407c0fc.tar.zst go-tangerine-0db86e4485176aff7c45f0ce673174ec8407c0fc.zip |
Updated to work with the new chain
Diffstat (limited to 'ethereum.go')
-rw-r--r-- | ethereum.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ethereum.go b/ethereum.go index 36cd75e47..ac1de5af4 100644 --- a/ethereum.go +++ b/ethereum.go @@ -190,16 +190,19 @@ func main() { // Apply all transactions to the block ethereum.StateManager().ApplyTransactions(block, block.Transactions()) - ethereum.StateManager().AccumelateRewards(block, block) + ethereum.StateManager().Prepare(block.State(), block.State()) + ethereum.StateManager().AccumelateRewards(block) // Search the nonce block.Nonce = pow.Search(block) ethereum.Broadcast(ethwire.MsgBlockTy, []interface{}{block.Value().Val}) + + ethereum.StateManager().PrepareDefault(block) err := ethereum.StateManager().ProcessBlock(block) if err != nil { log.Println(err) } else { - //log.Println("\n+++++++ MINED BLK +++++++\n", ethereum.BlockChain().CurrentBlock) + log.Println("\n+++++++ MINED BLK +++++++\n", ethereum.BlockChain().CurrentBlock) log.Printf("🔨 Mined block %x\n", block.Hash()) } } |