[#493] node: Connect to main chain

Establish client connection with main chain node on storage node startup.
Client is configured simlarly to morph client.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2021-05-11 13:24:13 +03:00 committed by Alex Vanin
parent 1fa49bca9c
commit 6339f1a468
2 changed files with 47 additions and 21 deletions

View file

@ -80,6 +80,9 @@ const (
cfgMorphNotifyRPCAddress = "morph.notification_endpoint"
cfgMorphNotifyDialTimeout = "morph.dial_timeout"
cfgMainChainRPCAddress = "mainchain.rpc_endpoint"
cfgMainChainDialTimeout = "mainchain.dial_timeout"
// config keys for cfgAccounting
cfgAccountingContract = "accounting.scripthash"
cfgAccountingFee = "accounting.fee"
@ -219,6 +222,8 @@ type cfg struct {
closers []func()
cfgReputation cfgReputation
mainChainClient *client.Client
}
type cfgGRPC struct {