Move websockets out of cmd/util

This commit is contained in:
Taylor Gerring
2015-01-20 13:40:24 -06:00
parent d92fde6980
commit 0c77a96249
2 changed files with 22 additions and 29 deletions

View File

@ -40,6 +40,7 @@ import (
"github.com/ethereum/go-ethereum/rlp"
"github.com/ethereum/go-ethereum/rpc"
"github.com/ethereum/go-ethereum/state"
"github.com/ethereum/go-ethereum/websocket"
"github.com/ethereum/go-ethereum/xeth"
)
@ -200,6 +201,13 @@ func StartRpc(ethereum *eth.Ethereum, RpcPort int) {
}
}
func StartWebSockets(eth *eth.Ethereum) {
clilogger.Infoln("Starting WebSockets")
sock := websocket.NewWebSocketServer(eth)
go sock.Serv()
}
var gminer *miner.Miner
func GetMiner() *miner.Miner {