mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-04 11:03:48 +00:00
21 lines
462 B
Go
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
|
|
|
|
}
|