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