good morning!!!!

Skip to content
Snippets Groups Projects
Commit 3a03d091 authored by Jeffrey Wilcke's avatar Jeffrey Wilcke
Browse files

Removed RlpValue in favour of Value

parent fe59a2b2
No related branches found
No related tags found
No related merge requests found
...@@ -79,9 +79,9 @@ func (i *Console) ValidateInput(action string, argumentLength int) error { ...@@ -79,9 +79,9 @@ func (i *Console) ValidateInput(action string, argumentLength int) error {
} }
func (i *Console) PrintRoot() { func (i *Console) PrintRoot() {
root := ethutil.Conv(i.trie.Root) root := ethutil.NewValue(i.trie.Root)
if len(root.AsBytes()) != 0 { if len(root.Bytes()) != 0 {
fmt.Println(hex.EncodeToString(root.AsBytes())) fmt.Println(hex.EncodeToString(root.Bytes()))
} else { } else {
fmt.Println(i.trie.Root) fmt.Println(i.trie.Root)
} }
...@@ -127,7 +127,7 @@ func (i *Console) ParseInput(input string) bool { ...@@ -127,7 +127,7 @@ func (i *Console) ParseInput(input string) bool {
ethutil.BigPow(2, 36), // diff ethutil.BigPow(2, 36), // diff
ethutil.Big(tokens[2]))) // nonce ethutil.Big(tokens[2]))) // nonce
case "decode": case "decode":
value := ethutil.NewRlpValueFromBytes([]byte(tokens[1])) value := ethutil.NewValueFromBytes([]byte(tokens[1]))
fmt.Println(value) fmt.Println(value)
case "getaddr": case "getaddr":
encoded, _ := hex.DecodeString(tokens[1]) encoded, _ := hex.DecodeString(tokens[1])
...@@ -162,7 +162,7 @@ func (i *Console) ParseInput(input string) bool { ...@@ -162,7 +162,7 @@ func (i *Console) ParseInput(input string) bool {
addr, _ := hex.DecodeString(tokens[1]) addr, _ := hex.DecodeString(tokens[1])
data, _ := ethutil.Config.Db.Get(addr) data, _ := ethutil.Config.Db.Get(addr)
if len(data) != 0 { if len(data) != 0 {
decoder := ethutil.NewRlpValueFromBytes(data) decoder := ethutil.NewValueFromBytes(data)
fmt.Println(decoder) fmt.Println(decoder)
} else { } else {
fmt.Println("gettx: tx not found") fmt.Println("gettx: tx not found")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment