(cid *big.Int)
| 395 | } |
| 396 | |
| 397 | func (e *ethAdaptor) SignalBootstrap(cid *big.Int) (err error) { |
| 398 | if !e.isConnecting() { |
| 399 | err = errors.New("not connecting to geth") |
| 400 | return |
| 401 | } |
| 402 | |
| 403 | // define how to parse parameters and execute proxy function |
| 404 | opCtx, opCancel := context.WithTimeout(e.ctx, e.setTimeout) |
| 405 | defer opCancel() |
| 406 | proxies := e.proxies |
| 407 | |
| 408 | f := func(ctx context.Context) (tx *types.Transaction, err error) { |
| 409 | idx := getIndex(ctx) |
| 410 | if idx == -1 { |
| 411 | err = errors.New("no client index in context") |
| 412 | } else { |
| 413 | tx, err = proxies[idx].SignalBootstrap(cid) |
| 414 | if err != nil { |
| 415 | err = &OnchainError{err: errors.Errorf(": %w", err), Idx: idx} |
| 416 | } else { |
| 417 | |
| 418 | e.logger.Info(fmt.Sprintf("SignalBootstrap %x", tx.Hash())) |
| 419 | } |
| 420 | } |
| 421 | if err != nil { |
| 422 | e.logger.Error(err) |
| 423 | } |
| 424 | return |
| 425 | } |
| 426 | return e.waitForReply(&request{opCtx: opCtx, f: f, reply: make(chan *response)}) |
| 427 | } |
| 428 | |
| 429 | func (e *ethAdaptor) SignalUnregister(addr common.Address) (err error) { |
| 430 | if !e.isConnecting() { |
nothing calls this directly
no test coverage detected