Moved RPC Server and implemented it as a package
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
|
||||
var StartConsole bool
|
||||
var StartMining bool
|
||||
var StartRpc bool
|
||||
var UseUPnP bool
|
||||
var OutboundPort string
|
||||
var ShowGenesis bool
|
||||
@@ -24,6 +25,7 @@ func Init() {
|
||||
flag.BoolVar(&StartMining, "m", false, "start dagger mining")
|
||||
flag.BoolVar(&ShowGenesis, "g", false, "prints genesis header and exits")
|
||||
//flag.BoolVar(&UseGui, "gui", true, "use the gui")
|
||||
flag.BoolVar(&StartRpc, "r", false, "start rpc server")
|
||||
flag.BoolVar(&NonInteractive, "y", false, "non-interactive mode (say yes to confirmations)")
|
||||
flag.BoolVar(&UseUPnP, "upnp", false, "enable UPnP support")
|
||||
flag.BoolVar(&UseSeed, "seed", true, "seed peers")
|
||||
|
@@ -4,6 +4,7 @@ import (
|
||||
"fmt"
|
||||
"github.com/ethereum/eth-go"
|
||||
"github.com/ethereum/eth-go/ethchain"
|
||||
"github.com/ethereum/eth-go/etherpc"
|
||||
"github.com/ethereum/eth-go/ethminer"
|
||||
"github.com/ethereum/eth-go/ethutil"
|
||||
"github.com/ethereum/go-ethereum/utils"
|
||||
@@ -131,6 +132,10 @@ func main() {
|
||||
console := NewConsole(ethereum)
|
||||
go console.Start()
|
||||
}
|
||||
if StartRpc {
|
||||
ethereum.RpcServer = etherpc.NewJsonRpcServer()
|
||||
go ethereum.RpcServer.Start()
|
||||
}
|
||||
|
||||
RegisterInterrupts(ethereum)
|
||||
ethereum.Start()
|
||||
|
Reference in New Issue
Block a user