diff --git a/server/args.go b/server/args.go index ac609bb..98b5d7b 100644 --- a/server/args.go +++ b/server/args.go @@ -148,7 +148,7 @@ func MakeDefaultTestArgs() *Args { Banner: nil, Country: DefaultCountry, - GenesisHash: GENESIS_HASH, + GenesisHash: chaincfg.TestNet3Params.GenesisHash.String(), ServerVersion: HUB_PROTOCOL_VERSION, ProtocolMin: PROTOCOL_MIN, ProtocolMax: PROTOCOL_MAX, diff --git a/server/server.go b/server/server.go index 0addc04..c53927a 100644 --- a/server/server.go +++ b/server/server.go @@ -277,6 +277,7 @@ func MakeHubServer(grp *stop.Group, args *Args) *Server { myDB.Grp = stop.NewDebug(grp) } + // Determine which chain to use based on db and cli values dbChain := (*chaincfg.Params)(nil) if myDB != nil && myDB.LastState != nil && myDB.LastState.Genesis != nil { // The chain params can be inferred from DBStateValue. @@ -313,6 +314,8 @@ func MakeHubServer(grp *stop.Group, args *Args) *Server { } logrus.Infof("network: %v", chain.Name) + args.GenesisHash = chain.GenesisHash.String() + s := &Server{ GrpcServer: grpcServer, Args: args,