aboutsummaryrefslogtreecommitdiffstats
path: root/ethereum.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-02-08 05:25:59 +0800
committerobscuren <geffobscura@gmail.com>2014-02-08 05:25:59 +0800
commit827f341c97e9243b0c04a2fbde363b949bc3215d (patch)
treee0bc2de8786988cc731b04439dba5aaf4923d2b7 /ethereum.go
parent9f4a81a02e6d84a192c3cdcb42866563456f5267 (diff)
downloadgo-tangerine-827f341c97e9243b0c04a2fbde363b949bc3215d.tar
go-tangerine-827f341c97e9243b0c04a2fbde363b949bc3215d.tar.gz
go-tangerine-827f341c97e9243b0c04a2fbde363b949bc3215d.tar.bz2
go-tangerine-827f341c97e9243b0c04a2fbde363b949bc3215d.tar.lz
go-tangerine-827f341c97e9243b0c04a2fbde363b949bc3215d.tar.xz
go-tangerine-827f341c97e9243b0c04a2fbde363b949bc3215d.tar.zst
go-tangerine-827f341c97e9243b0c04a2fbde363b949bc3215d.zip
Genesis loggingpoc1
Diffstat (limited to 'ethereum.go')
-rw-r--r--ethereum.go11
1 files changed, 9 insertions, 2 deletions
diff --git a/ethereum.go b/ethereum.go
index 8ba99a388..659134ffd 100644
--- a/ethereum.go
+++ b/ethereum.go
@@ -20,10 +20,12 @@ var StartConsole bool
var StartMining bool
var UseUPnP bool
var OutboundPort string
+var ShowGenesis bool
func Init() {
flag.BoolVar(&StartConsole, "c", false, "debug and testing console")
flag.BoolVar(&StartMining, "m", false, "start dagger mining")
+ flag.BoolVar(&ShowGenesis, "g", false, "prints genesis header and exits")
flag.BoolVar(&UseUPnP, "upnp", false, "enable UPnP support")
flag.StringVar(&OutboundPort, "port", "30303", "listening port")
@@ -52,8 +54,6 @@ func main() {
ethchain.InitFees()
ethutil.ReadConfig()
- log.Printf("Starting Ethereum v%s\n", ethutil.Config.Ver)
-
// Instantiated a eth stack
ethereum, err := eth.New(eth.CapDefault, UseUPnP)
if err != nil {
@@ -61,6 +61,13 @@ func main() {
return
}
+ if ShowGenesis {
+ fmt.Println(ethereum.BlockManager.BlockChain().Genesis())
+ os.Exit(0)
+ }
+
+ log.Printf("Starting Ethereum v%s\n", ethutil.Config.Ver)
+
if StartConsole {
err := os.Mkdir(ethutil.Config.ExecPath, os.ModePerm)
// Error is OK if the error is ErrExist