(ctx *cli.Context)
| 223 | } |
| 224 | |
| 225 | func showRnodes(ctx *cli.Context) error { |
| 226 | rnd, _, _, err := createContractInstanceAndTransactor(ctx, false) |
| 227 | if err != nil { |
| 228 | return err |
| 229 | } |
| 230 | rnodes, err := rnd.GetRnodes(nil) |
| 231 | if err != nil { |
| 232 | log.Info("Failed to get rnodes", "err", err) |
| 233 | return err |
| 234 | } |
| 235 | log.Info("rnode len", "value", len(rnodes)) |
| 236 | |
| 237 | for _, r := range rnodes { |
| 238 | log.Info("rnode", "addr", r.Hex()) |
| 239 | } |
| 240 | |
| 241 | return nil |
| 242 | } |
| 243 | |
| 244 | func createContractInstanceAndTransactor(ctx *cli.Context, withTransactor bool) (contract *rnode.Rnode, opts *bind.TransactOpts, client *cpclient.Client, err error) { |
| 245 | contractAddr, client, key, err := utils.PrepareAll(ctx, withTransactor) |
nothing calls this directly
no test coverage detected