cosmos / relayer-archive

An example of a server side IBC relayer to be used for Game of Zones and beyond
56 stars 31 forks source link

Update Period is set as Trusting Period #7

Closed cmwaters closed 4 years ago

cmwaters commented 4 years ago

updatePeriod is never used

var (
    lcMap map[string]*lite.Client // chainID => client

    trustedHash    []byte
    trustedHeight  int64
    trustingPeriod time.Duration
    updatePeriod   time.Duration
    url            string
)

Instead the update period for the lite client is set as lite.UpdatePeriod(c.TrustOptions.Get().Period)) where the trusted period is set here:

if trustingPeriod > 0 {
    chain.TrustOptions.Period = trustingPeriod.String()
}
melekes commented 4 years ago

Update period should be a config option imho.

cmwaters commented 4 years ago

" Update period should be a config option imho." As in an option in the command line or one set in the config file?

melekes commented 4 years ago

config file

reset cmd will have a update-period flag, but we don't have to implement that now

cmwaters commented 4 years ago

Okay, I will add that in