daemon: refactor out of cmd into own package
This commit is contained in:
parent
7aa1d67c97
commit
983b7f48e8
|
@ -5,6 +5,7 @@ import (
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/tendermint/tendermint/config"
|
"github.com/tendermint/tendermint/config"
|
||||||
|
"github.com/tendermint/tendermint/daemon"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
@ -26,7 +27,7 @@ Commands:
|
||||||
switch args[0] {
|
switch args[0] {
|
||||||
case "daemon":
|
case "daemon":
|
||||||
config.ParseFlags(args[1:])
|
config.ParseFlags(args[1:])
|
||||||
daemon()
|
daemon.Daemon()
|
||||||
case "gen_account":
|
case "gen_account":
|
||||||
gen_account()
|
gen_account()
|
||||||
case "gen_validator":
|
case "gen_validator":
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package main
|
package daemon
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"os"
|
"os"
|
||||||
|
@ -122,7 +122,7 @@ func (n *Node) inboundConnectionRoutine(l p2p.Listener) {
|
||||||
// cleanup
|
// cleanup
|
||||||
}
|
}
|
||||||
|
|
||||||
func daemon() {
|
func Daemon() {
|
||||||
|
|
||||||
// Create & start node
|
// Create & start node
|
||||||
n := NewNode()
|
n := NewNode()
|
|
@ -0,0 +1,7 @@
|
||||||
|
package daemon
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/tendermint/tendermint/logger"
|
||||||
|
)
|
||||||
|
|
||||||
|
var log = logger.New("module", "daemon")
|
Loading…
Reference in New Issue