Server endpoints goroutine refactor #69
2 changed files with 4 additions and 1 deletions
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue