implemented timeout for an initial GetSeed call.

Added RPC.Endpoint.Authority
This commit is contained in:
2024-12-08 16:48:23 +09:00
parent 7479cc0f3a
commit feedff3f04
3 changed files with 33 additions and 12 deletions

View File

@ -51,8 +51,9 @@ type RPCServiceConfig struct { // rpc server-side configuration
}
type RPCEndpointConfig struct { // rpc client-side configuration
Authority string `yaml:"authority"`
Addrs []string `yaml:"addresses"`
Authority string `yaml:"authority"`
Addrs []string `yaml:"addresses"`
SeedTimeout int `yaml:"seed-timeout"`
}
type ServerConfig struct {

View File

@ -226,6 +226,8 @@ func client_main(ctl_addrs []string, rpc_addrs []string, peer_addrs []string, cf
cc.ServerAddrs = rpc_addrs
cc.PeerAddrs = peer_addrs
cc.ServerSeedTimeout = cfg.RPC.Endpoint.SeedTimeout
cc.ServerAuthority = cfg.RPC.Endpoint.Authority
c.StartService(&cc)
c.StartCtlService() // control channel