MCPcopy Create free account
hub / github.com/CPChain/chain / showConfigs

Function showConfigs

tools/contract-admin/rnode/cmd_rnode.go:197–223  ·  view source on GitHub ↗
(ctx *cli.Context)

Source from the content-addressed store, hash-verified

195}
196
197func showConfigs(ctx *cli.Context) error {
198 rnd, _, _, err := createContractInstanceAndTransactor(ctx, false)
199 if err != nil {
200 return err
201 }
202 period, err := rnd.Period(nil)
203 if err != nil {
204 log.Info("Failed to get period", "err", err)
205 return err
206 }
207 log.Info("period", "value", period.Int64())
208
209 version, err := rnd.SupportedVersion(nil)
210 if err != nil {
211 log.Info("Failed to get version", "err", err)
212 return err
213 }
214 log.Info("version", "value", version.Int64())
215
216 threshold, err := rnd.RnodeThreshold(nil)
217 if err != nil {
218 log.Info("Failed to get threshold", "err", err)
219 return err
220 }
221 log.Info("threshold", "value", threshold)
222 return nil
223}
224
225func showRnodes(ctx *cli.Context) error {
226 rnd, _, _, err := createContractInstanceAndTransactor(ctx, false)

Callers

nothing calls this directly

Calls 6

Int64Method · 0.80
PeriodMethod · 0.65
InfoMethod · 0.65
SupportedVersionMethod · 0.45
RnodeThresholdMethod · 0.45

Tested by

no test coverage detected