mirror of
https://gitlab.com/pulsechaincom/go-pulse.git
synced 2024-12-25 12:57:17 +00:00
Implemented rpc for ethereal and ethereum
This commit is contained in:
parent
bcb3ad7332
commit
e94e5ac75d
@ -4,6 +4,8 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"github.com/ethereum/eth-go"
|
"github.com/ethereum/eth-go"
|
||||||
"github.com/ethereum/eth-go/ethchain"
|
"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/eth-go/ethutil"
|
||||||
"github.com/ethereum/go-ethereum/ethereal/ui"
|
"github.com/ethereum/go-ethereum/ethereal/ui"
|
||||||
"github.com/ethereum/go-ethereum/utils"
|
"github.com/ethereum/go-ethereum/utils"
|
||||||
@ -98,6 +100,11 @@ func main() {
|
|||||||
os.Exit(0)
|
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)
|
log.Printf("Starting Ethereum GUI v%s\n", ethutil.Config.Ver)
|
||||||
|
|
||||||
// Set the max peers
|
// Set the max peers
|
||||||
|
@ -35,7 +35,7 @@ type ExtApplication struct {
|
|||||||
|
|
||||||
func NewExtApplication(container AppContainer, lib *UiLib) *ExtApplication {
|
func NewExtApplication(container AppContainer, lib *UiLib) *ExtApplication {
|
||||||
app := &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 ethutil.React, 1),
|
make(chan ethutil.React, 1),
|
||||||
make(chan bool),
|
make(chan bool),
|
||||||
|
@ -134,10 +134,8 @@ func main() {
|
|||||||
go console.Start()
|
go console.Start()
|
||||||
}
|
}
|
||||||
if StartRpc {
|
if StartRpc {
|
||||||
// TODO: Can we make this work again?
|
ethereum.RpcServer = etherpc.NewJsonRpcServer(ethpub.NewPEthereum(ethereum.StateManager(), ethereum.BlockChain(), ethereum.TxPool()))
|
||||||
//ethereum.RpcServer = etherpc.NewJsonRpcServer(ethpub.NewPEthereum(ethereum))
|
go ethereum.RpcServer.Start()
|
||||||
rpc := etherpc.NewJsonRpcServer(ethpub.NewPEthereum(ethereum))
|
|
||||||
go rpc.Start()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
RegisterInterrupts(ethereum)
|
RegisterInterrupts(ethereum)
|
||||||
|
Loading…
Reference in New Issue
Block a user