Merge pull request #1813 from kobigurk/develop

cmd/geth: extradata is correcly initialized with console
This commit is contained in:
Felix Lange 2015-09-17 19:25:32 +02:00
commit bdf4fd6091
1 changed files with 3 additions and 1 deletions

View File

@ -360,7 +360,7 @@ func main() {
} }
} }
// MakeExtra resolves extradata for the miner from a flag or returns a default. // makeExtra resolves extradata for the miner from a flag or returns a default.
func makeExtra(ctx *cli.Context) []byte { func makeExtra(ctx *cli.Context) []byte {
if ctx.GlobalIsSet(ExtraDataFlag.Name) { if ctx.GlobalIsSet(ExtraDataFlag.Name) {
return []byte(ctx.GlobalString(ExtraDataFlag.Name)) return []byte(ctx.GlobalString(ExtraDataFlag.Name))
@ -444,6 +444,8 @@ func console(ctx *cli.Context) {
utils.CheckLegalese(ctx.GlobalString(utils.DataDirFlag.Name)) utils.CheckLegalese(ctx.GlobalString(utils.DataDirFlag.Name))
cfg := utils.MakeEthConfig(ClientIdentifier, nodeNameVersion, ctx) cfg := utils.MakeEthConfig(ClientIdentifier, nodeNameVersion, ctx)
cfg.ExtraData = makeExtra(ctx)
ethereum, err := eth.New(cfg) ethereum, err := eth.New(cfg)
if err != nil { if err != nil {
utils.Fatalf("%v", err) utils.Fatalf("%v", err)