Commit 27a03d3e authored by obscuren's avatar obscuren

Updated to the new Trie

parent 6ab368cf
......@@ -76,11 +76,11 @@ func (i *Console) ValidateInput(action string, argumentLength int) error {
}
func (i *Console) PrintRoot() {
root := ethutil.Conv(i.trie.RootT)
root := ethutil.Conv(i.trie.Root)
if len(root.AsBytes()) != 0 {
fmt.Println(hex.EncodeToString(root.AsBytes()))
} else {
fmt.Println(i.trie.RootT)
fmt.Println(i.trie.Root)
}
}
......@@ -108,15 +108,15 @@ func (i *Console) ParseInput(input string) bool {
} else {
switch tokens[0] {
case "update":
i.trie.UpdateT(tokens[1], tokens[2])
i.trie.Update(tokens[1], tokens[2])
i.PrintRoot()
case "get":
fmt.Println(i.trie.GetT(tokens[1]))
fmt.Println(i.trie.Get(tokens[1]))
case "root":
i.PrintRoot()
case "rawroot":
fmt.Println(i.trie.RootT)
fmt.Println(i.trie.Root)
case "print":
i.db.Print()
case "dag":
......
......@@ -84,7 +84,7 @@ func main() {
ethereum.Start()
if StartMining {
blockTime := time.Duration(2)
blockTime := time.Duration(10)
log.Printf("Dev Test Mining started. Blocks found each %d seconds\n", blockTime)
// Fake block mining. It broadcasts a new block every 5 seconds
......@@ -107,7 +107,7 @@ func main() {
if err != nil {
log.Println(err)
} else {
log.Println("\n+++++++ MINED BLK +++++++\n", block.String())
//log.Println("\n+++++++ MINED BLK +++++++\n", block.String())
}
}
}()
......
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