()
| 416 | return |
| 417 | } |
| 418 | func (e *ethAdaptor) BootstrapStartThreshold() (result uint64, err error) { |
| 419 | if !e.isConnecting() { |
| 420 | err = errors.New("not connecting to geth") |
| 421 | } |
| 422 | proxies := e.proxies |
| 423 | f := func(ctx context.Context) (chan interface{}, chan error) { |
| 424 | outc := make(chan interface{}) |
| 425 | errc := make(chan error) |
| 426 | go func() { |
| 427 | defer close(outc) |
| 428 | defer close(errc) |
| 429 | idx := getIndex(ctx) |
| 430 | if idx == -1 { |
| 431 | err = errors.New("no client index in context") |
| 432 | } else { |
| 433 | if val, err := proxies[idx].BootstrapStartThreshold(); err != nil { |
| 434 | replyError(ctx, errc, &OnchainError{err: errors.Errorf("get err : %w", err), Idx: idx}) |
| 435 | } else { |
| 436 | utils.ReportResult(ctx, outc, val) |
| 437 | } |
| 438 | } |
| 439 | }() |
| 440 | return outc, errc |
| 441 | } |
| 442 | var r interface{} |
| 443 | if r, err = e.get(f); err != nil { |
| 444 | return |
| 445 | } |
| 446 | if v, ok := r.(*big.Int); ok { |
| 447 | result = v.Uint64() |
| 448 | } else { |
| 449 | err = errors.New("casting error") |
| 450 | } |
| 451 | return |
| 452 | } |
| 453 | func (e *ethAdaptor) GroupPubKey(gIdx int) (result [4]*big.Int, err error) { |
| 454 | if !e.isConnecting() { |
| 455 | err = errors.New("not connecting to geth") |
nothing calls this directly
no test coverage detected