go-ethereum/p2p/simulations/examples/connectivity.go
Lewis Marshall 4c6648ef49 all: Fix logging
Signed-off-by: Lewis Marshall <lewis@lmars.net>
2017-05-06 14:23:39 +01:00

21 lines
462 B
Go

package main
import (
"os"
"runtime"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/p2p/simulations"
)
func main() {
runtime.GOMAXPROCS(runtime.NumCPU())
log.Root().SetHandler(log.LvlFilterHandler(log.LvlTrace, log.StreamHandler(os.Stderr, log.TerminalFormat(false))))
c, quitc := simulations.NewSessionController(simulations.DefaultNet)
simulations.StartRestApiServer("8888", c)
// wait until server shuts down
<-quitc
}