aboutsummaryrefslogtreecommitdiffstats
path: root/ethereum/repl.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-06-05 15:01:10 +0800
committerobscuren <geffobscura@gmail.com>2014-06-05 15:01:10 +0800
commita107a5db052c53f54e4023111a8cc97fbf6f51e2 (patch)
treefbdd3e932c48a4ff233ff3df5c5569ed52011e5f /ethereum/repl.go
parent964587b14a52f5a64c166fe28cc5a51eb2bac1c7 (diff)
parent7843390ecd52df37a28282d76be198d5456ce385 (diff)
downloaddexon-a107a5db052c53f54e4023111a8cc97fbf6f51e2.tar
dexon-a107a5db052c53f54e4023111a8cc97fbf6f51e2.tar.gz
dexon-a107a5db052c53f54e4023111a8cc97fbf6f51e2.tar.bz2
dexon-a107a5db052c53f54e4023111a8cc97fbf6f51e2.tar.lz
dexon-a107a5db052c53f54e4023111a8cc97fbf6f51e2.tar.xz
dexon-a107a5db052c53f54e4023111a8cc97fbf6f51e2.tar.zst
dexon-a107a5db052c53f54e4023111a8cc97fbf6f51e2.zip
Merge branch 'develop' of github.com-obscure:ethereum/go-ethereum into develop
Diffstat (limited to 'ethereum/repl.go')
-rw-r--r--ethereum/repl.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/ethereum/repl.go b/ethereum/repl.go
index 10f51675e..0208459ad 100644
--- a/ethereum/repl.go
+++ b/ethereum/repl.go
@@ -66,6 +66,10 @@ func (self *JSEthereum) GetBlock(hash string) otto.Value {
return self.toVal(&JSBlock{self.PEthereum.GetBlock(hash), self})
}
+func (self *JSEthereum) GetPeers() otto.Value {
+ return self.toVal(self.PEthereum.GetPeers())
+}
+
func (self *JSEthereum) GetKey() otto.Value {
return self.toVal(self.PEthereum.GetKey())
}
@@ -74,6 +78,10 @@ func (self *JSEthereum) GetStateObject(addr string) otto.Value {
return self.toVal(self.PEthereum.GetStateObject(addr))
}
+func (self *JSEthereum) GetStateKeyVals(addr string) otto.Value {
+ return self.toVal(self.PEthereum.GetStateObject(addr).StateKeyVal(false))
+}
+
func (self *JSEthereum) Transact(key, recipient, valueStr, gasStr, gasPriceStr, dataStr string) otto.Value {
r, err := self.PEthereum.Transact(key, recipient, valueStr, gasStr, gasPriceStr, dataStr)
if err != nil {
@@ -101,7 +109,7 @@ func (self *JSEthereum) toVal(v interface{}) otto.Value {
result, err := self.vm.ToValue(v)
if err != nil {
- fmt.Println(err)
+ fmt.Println("Value unknown:", err)
return otto.UndefinedValue()
}