aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-01-29 01:36:41 +0800
committerobscuren <geffobscura@gmail.com>2015-01-29 01:36:41 +0800
commit1c51e12c181fb781cafaf34fc8dd2cb07fd85df7 (patch)
tree38465edc586ae8080018f37efa8657c7dfeab6af /cmd
parent45e15f62f594d6f5191e60a54aead33602838e98 (diff)
parent872b2497114209119becf2e8a4d4a5818e2084ee (diff)
downloaddexon-1c51e12c181fb781cafaf34fc8dd2cb07fd85df7.tar
dexon-1c51e12c181fb781cafaf34fc8dd2cb07fd85df7.tar.gz
dexon-1c51e12c181fb781cafaf34fc8dd2cb07fd85df7.tar.bz2
dexon-1c51e12c181fb781cafaf34fc8dd2cb07fd85df7.tar.lz
dexon-1c51e12c181fb781cafaf34fc8dd2cb07fd85df7.tar.xz
dexon-1c51e12c181fb781cafaf34fc8dd2cb07fd85df7.tar.zst
dexon-1c51e12c181fb781cafaf34fc8dd2cb07fd85df7.zip
Merge branch 'jsonrpc' into qt5.4
Diffstat (limited to 'cmd')
-rw-r--r--cmd/mist/ext_app.go4
-rw-r--r--cmd/mist/gui.go12
-rw-r--r--cmd/mist/html_container.go2
-rw-r--r--cmd/mist/qml_container.go2
-rw-r--r--cmd/mist/ui_lib.go12
-rw-r--r--cmd/utils/cmd.go2
6 files changed, 17 insertions, 17 deletions
diff --git a/cmd/mist/ext_app.go b/cmd/mist/ext_app.go
index 07900cd2f..20ec52e60 100644
--- a/cmd/mist/ext_app.go
+++ b/cmd/mist/ext_app.go
@@ -44,7 +44,7 @@ type AppContainer interface {
}
type ExtApplication struct {
- *xeth.JSXEth
+ *xeth.XEth
eth core.EthManager
events event.Subscription
@@ -58,7 +58,7 @@ type ExtApplication struct {
func NewExtApplication(container AppContainer, lib *UiLib) *ExtApplication {
return &ExtApplication{
- JSXEth: xeth.NewJSXEth(lib.eth),
+ XEth: xeth.New(lib.eth),
eth: lib.eth,
watcherQuitChan: make(chan bool),
filters: make(map[string]*core.Filter),
diff --git a/cmd/mist/gui.go b/cmd/mist/gui.go
index f78cb7c49..edc799abc 100644
--- a/cmd/mist/gui.go
+++ b/cmd/mist/gui.go
@@ -75,7 +75,7 @@ type Gui struct {
logLevel logger.LogLevel
open bool
- xeth *xeth.JSXEth
+ xeth *xeth.XEth
Session string
clientIdentity *p2p.SimpleClientIdentity
@@ -93,7 +93,7 @@ func NewWindow(ethereum *eth.Ethereum, config *ethutil.ConfigManager, clientIden
panic(err)
}
- xeth := xeth.NewJSXEth(ethereum)
+ xeth := xeth.New(ethereum)
gui := &Gui{eth: ethereum,
txDb: db,
xeth: xeth,
@@ -120,9 +120,9 @@ func (gui *Gui) Start(assetPath string) {
// Register ethereum functions
qml.RegisterTypes("Ethereum", 1, 0, []qml.TypeSpec{{
- Init: func(p *xeth.JSBlock, obj qml.Object) { p.Number = 0; p.Hash = "" },
+ Init: func(p *xeth.Block, obj qml.Object) { p.Number = 0; p.Hash = "" },
}, {
- Init: func(p *xeth.JSTransaction, obj qml.Object) { p.Value = ""; p.Hash = ""; p.Address = "" },
+ Init: func(p *xeth.Transaction, obj qml.Object) { p.Value = ""; p.Hash = ""; p.Address = "" },
}, {
Init: func(p *xeth.KeyVal, obj qml.Object) { p.Key = ""; p.Value = "" },
}})
@@ -276,7 +276,7 @@ func (gui *Gui) insertTransaction(window string, tx *types.Transaction) {
}
var (
- ptx = xeth.NewJSTx(tx)
+ ptx = xeth.NewTx(tx)
send = ethutil.Bytes2Hex(tx.From())
rec = ethutil.Bytes2Hex(tx.To())
)
@@ -303,7 +303,7 @@ func (gui *Gui) readPreviousTransactions() {
func (gui *Gui) processBlock(block *types.Block, initial bool) {
name := ethutil.Bytes2Hex(block.Coinbase())
- b := xeth.NewJSBlock(block)
+ b := xeth.NewBlock(block)
b.Name = name
gui.getObjectByName("chainView").Call("addBlock", b, initial)
diff --git a/cmd/mist/html_container.go b/cmd/mist/html_container.go
index afc29382a..0909a6abd 100644
--- a/cmd/mist/html_container.go
+++ b/cmd/mist/html_container.go
@@ -140,7 +140,7 @@ func (app *HtmlApplication) Window() *qml.Window {
}
func (app *HtmlApplication) NewBlock(block *types.Block) {
- b := &xeth.JSBlock{Number: int(block.NumberU64()), Hash: ethutil.Bytes2Hex(block.Hash())}
+ b := &xeth.Block{Number: int(block.NumberU64()), Hash: ethutil.Bytes2Hex(block.Hash())}
app.webView.Call("onNewBlockCb", b)
}
diff --git a/cmd/mist/qml_container.go b/cmd/mist/qml_container.go
index 10b0b1c49..9d76d8fe4 100644
--- a/cmd/mist/qml_container.go
+++ b/cmd/mist/qml_container.go
@@ -70,7 +70,7 @@ func (app *QmlApplication) NewWatcher(quitChan chan bool) {
// Events
func (app *QmlApplication) NewBlock(block *types.Block) {
- pblock := &xeth.JSBlock{Number: int(block.NumberU64()), Hash: ethutil.Bytes2Hex(block.Hash())}
+ pblock := &xeth.Block{Number: int(block.NumberU64()), Hash: ethutil.Bytes2Hex(block.Hash())}
app.win.Call("onNewBlockCb", pblock)
}
diff --git a/cmd/mist/ui_lib.go b/cmd/mist/ui_lib.go
index 9fa368a4d..1438dab36 100644
--- a/cmd/mist/ui_lib.go
+++ b/cmd/mist/ui_lib.go
@@ -42,7 +42,7 @@ type memAddr struct {
// UI Library that has some basic functionality exposed
type UiLib struct {
- *xeth.JSXEth
+ *xeth.XEth
engine *qml.Engine
eth *eth.Ethereum
connected bool
@@ -61,7 +61,7 @@ type UiLib struct {
}
func NewUiLib(engine *qml.Engine, eth *eth.Ethereum, assetPath string) *UiLib {
- lib := &UiLib{JSXEth: xeth.NewJSXEth(eth), engine: engine, eth: eth, assetPath: assetPath, jsEngine: javascript.NewJSRE(eth), filterCallbacks: make(map[int][]int)} //, filters: make(map[int]*xeth.JSFilter)}
+ lib := &UiLib{XEth: xeth.New(eth), engine: engine, eth: eth, assetPath: assetPath, jsEngine: javascript.NewJSRE(eth), filterCallbacks: make(map[int][]int)} //, filters: make(map[int]*xeth.JSFilter)}
lib.miner = miner.New(eth.KeyManager().Address(), eth)
lib.filterManager = filter.NewFilterManager(eth.EventMux())
go lib.filterManager.Start()
@@ -178,7 +178,7 @@ func (self *UiLib) StartDebugger() {
func (self *UiLib) Transact(params map[string]interface{}) (string, error) {
object := mapToTxParams(params)
- return self.JSXEth.Transact(
+ return self.XEth.Transact(
object["from"],
object["to"],
object["value"],
@@ -200,7 +200,7 @@ func (self *UiLib) Compile(code string) (string, error) {
func (self *UiLib) Call(params map[string]interface{}) (string, error) {
object := mapToTxParams(params)
- return self.JSXEth.Execute(
+ return self.XEth.Execute(
object["to"],
object["value"],
object["gas"],
@@ -260,7 +260,7 @@ func (self *UiLib) NewFilter(object map[string]interface{}, view *qml.Common) (i
/* TODO remove me
filter := qt.NewFilterFromMap(object, self.eth)
filter.MessageCallback = func(messages state.Messages) {
- view.Call("messages", xeth.ToJSMessages(messages), id)
+ view.Call("messages", xeth.ToMessages(messages), id)
}
id = self.filterManager.InstallFilter(filter)
return id
@@ -284,7 +284,7 @@ func (self *UiLib) Messages(id int) *ethutil.List {
/* TODO remove me
filter := self.filterManager.GetFilter(id)
if filter != nil {
- messages := xeth.ToJSMessages(filter.Find())
+ messages := xeth.ToMessages(filter.Find())
return messages
}
diff --git a/cmd/utils/cmd.go b/cmd/utils/cmd.go
index 9cdd8b5d1..1d4655433 100644
--- a/cmd/utils/cmd.go
+++ b/cmd/utils/cmd.go
@@ -194,7 +194,7 @@ func KeyTasks(keyManager *crypto.KeyManager, KeyRing string, GenAddr bool, Secre
func StartRpc(ethereum *eth.Ethereum, RpcPort int) {
var err error
- ethereum.RpcServer, err = rpchttp.NewRpcHttpServer(xeth.NewJSXEth(ethereum), RpcPort)
+ ethereum.RpcServer, err = rpchttp.NewRpcHttpServer(xeth.New(ethereum), RpcPort)
if err != nil {
clilogger.Errorf("Could not start RPC interface (port %v): %v", RpcPort, err)
} else {