Commit 3335b945 authored by George Hotz's avatar George Hotz

trie works

parent 77526c5d
......@@ -34,6 +34,10 @@ func (s *StateDB) AddLog(log *types.Log) {
// It is called in between transactions to get the root hash that
// goes into transaction receipts.
func (s *StateDB) IntermediateRoot(deleteEmptyObjects bool) common.Hash {
// hopefully we don't have to implement this
// hmm, if we want the right receipt hash we do
// but for stateRoot we don't
fmt.Println("IntermediateRoot")
return common.HexToHash("0x0")
}
......
......@@ -44,6 +44,11 @@ func main() {
block := types.NewBlock(&header, txs, uncles, receipts, trie.NewStackTrie(nil))
fmt.Println("made block, parent:", header.ParentHash)
// if this is correct, the trie is working
if header.TxHash != block.Header().TxHash {
panic("wrong transactions for block")
}
_, _, _, err := processor.Process(block, statedb, vmconfig)
fmt.Println(err)
fmt.Println("process done")
......
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