Removed RlpValue in favour of Value

This commit is contained in:
obscuren 2014-02-15 01:34:35 +01:00
parent fe59a2b26d
commit 3a03d091eb

View File

@ -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 {
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 {
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")