|
|
@ -190,16 +190,19 @@ func main() { |
|
|
|
// Apply all transactions to the block
|
|
|
|
// Apply all transactions to the block
|
|
|
|
ethereum.StateManager().ApplyTransactions(block, block.Transactions()) |
|
|
|
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
|
|
|
|
// Search the nonce
|
|
|
|
block.Nonce = pow.Search(block) |
|
|
|
block.Nonce = pow.Search(block) |
|
|
|
ethereum.Broadcast(ethwire.MsgBlockTy, []interface{}{block.Value().Val}) |
|
|
|
ethereum.Broadcast(ethwire.MsgBlockTy, []interface{}{block.Value().Val}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ethereum.StateManager().PrepareDefault(block) |
|
|
|
err := ethereum.StateManager().ProcessBlock(block) |
|
|
|
err := ethereum.StateManager().ProcessBlock(block) |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
log.Println(err) |
|
|
|
log.Println(err) |
|
|
|
} else { |
|
|
|
} 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()) |
|
|
|
log.Printf("🔨 Mined block %x\n", block.Hash()) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|