daemon: refactor out of cmd into own package

This commit is contained in:
Ethan Buchman 2015-03-16 22:30:51 -07:00 committed by Jae Kwon
parent 7aa1d67c97
commit 983b7f48e8
3 changed files with 11 additions and 3 deletions

View File

@ -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":

View File

@ -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()

7
daemon/log.go Normal file
View File

@ -0,0 +1,7 @@
package daemon
import (
"github.com/tendermint/tendermint/logger"
)
var log = logger.New("module", "daemon")