diff options
author | Maran <maran.hidskes@gmail.com> | 2014-05-05 20:16:14 +0800 |
---|---|---|
committer | Maran <maran.hidskes@gmail.com> | 2014-05-05 20:16:14 +0800 |
commit | e94e5ac75dbbc4ec52228ae11377a4fa71ab95ab (patch) | |
tree | 4c04cda45703988643481b6f96811a7bec5c743b /ethereal | |
parent | bcb3ad733258b3d8f639763c2c78c85f43b2c826 (diff) | |
download | dexon-e94e5ac75dbbc4ec52228ae11377a4fa71ab95ab.tar dexon-e94e5ac75dbbc4ec52228ae11377a4fa71ab95ab.tar.gz dexon-e94e5ac75dbbc4ec52228ae11377a4fa71ab95ab.tar.bz2 dexon-e94e5ac75dbbc4ec52228ae11377a4fa71ab95ab.tar.lz dexon-e94e5ac75dbbc4ec52228ae11377a4fa71ab95ab.tar.xz dexon-e94e5ac75dbbc4ec52228ae11377a4fa71ab95ab.tar.zst dexon-e94e5ac75dbbc4ec52228ae11377a4fa71ab95ab.zip |
Implemented rpc for ethereal and ethereum
Diffstat (limited to 'ethereal')
-rw-r--r-- | ethereal/ethereum.go | 7 | ||||
-rw-r--r-- | ethereal/ui/ext_app.go | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/ethereal/ethereum.go b/ethereal/ethereum.go index 0adb9f151..782001195 100644 --- a/ethereal/ethereum.go +++ b/ethereal/ethereum.go @@ -4,6 +4,8 @@ import ( "fmt" "github.com/ethereum/eth-go" "github.com/ethereum/eth-go/ethchain" + "github.com/ethereum/eth-go/etherpc" + "github.com/ethereum/eth-go/ethpub" "github.com/ethereum/eth-go/ethutil" "github.com/ethereum/go-ethereum/ethereal/ui" "github.com/ethereum/go-ethereum/utils" @@ -98,6 +100,11 @@ func main() { os.Exit(0) } + if StartRpc { + ethereum.RpcServer = etherpc.NewJsonRpcServer(ethpub.NewPEthereum(ethereum.StateManager(), ethereum.BlockChain(), ethereum.TxPool())) + go ethereum.RpcServer.Start() + } + log.Printf("Starting Ethereum GUI v%s\n", ethutil.Config.Ver) // Set the max peers diff --git a/ethereal/ui/ext_app.go b/ethereal/ui/ext_app.go index a215709d0..110ad37d7 100644 --- a/ethereal/ui/ext_app.go +++ b/ethereal/ui/ext_app.go @@ -35,7 +35,7 @@ type ExtApplication struct { func NewExtApplication(container AppContainer, lib *UiLib) *ExtApplication { app := &ExtApplication{ - ethpub.NewPEthereum(lib.eth), + ethpub.NewPEthereum(lib.eth.StateManager(), lib.eth.BlockChain(), lib.eth.TxPool()), make(chan ethutil.React, 1), make(chan ethutil.React, 1), make(chan bool), |