Commit 74cec80e authored by George Hotz's avatar George Hotz

meh, good enough

parent d368578a
......@@ -101,7 +101,7 @@ func (ethash *Ethash) Finalize(chain consensus.ChainHeaderReader, header *types.
// Accumulate any block and uncle rewards and commit the final state root
accumulateRewards(chain.Config(), state, header, uncles)
header.Root = state.IntermediateRoot(chain.Config().IsEIP158(header.Number))
fmt.Println("new Root", header.Root)
//fmt.Println("new Root", header.Root)
}
func (ethash *Ethash) FinalizeAndAssemble(chain consensus.ChainHeaderReader, header *types.Header, state *state.StateDB, txs []*types.Transaction, uncles []*types.Header, receipts []*types.Receipt) (*types.Block, error) {
......
......@@ -14,8 +14,16 @@ import (
)
func main() {
//blockNumber := 13284469
blockNumber := 13284491
// 0 tx
//blockNumber := 13284491
// low tx
blockNumber := 13284469
// more tx with delete issue
//blockNumber := 13284053
// read header
var header types.Header
{
......@@ -67,5 +75,5 @@ func main() {
/*outHash, err := statedb.Commit(true)
fmt.Println(err)*/
fmt.Println("process done with hash", header.Root, "-?>", newheader.Root)
fmt.Println("process done with hash", header.Root, "->", block.Header().Root, "real", newheader.Root)
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment