(addr common.Address)
| 427 | } |
| 428 | |
| 429 | func (e *ethAdaptor) SignalUnregister(addr common.Address) (err error) { |
| 430 | if !e.isConnecting() { |
| 431 | err = errors.New("not connecting to geth") |
| 432 | return |
| 433 | } |
| 434 | |
| 435 | // define how to parse parameters and execute proxy function |
| 436 | opCtx, opCancel := context.WithTimeout(e.ctx, e.setTimeout) |
| 437 | defer opCancel() |
| 438 | proxies := e.proxies |
| 439 | |
| 440 | f := func(ctx context.Context) (tx *types.Transaction, err error) { |
| 441 | idx := getIndex(ctx) |
| 442 | if idx == -1 { |
| 443 | err = errors.New("no client index in context") |
| 444 | } else { |
| 445 | tx, err = proxies[idx].SignalUnregister(addr) |
| 446 | if err != nil { |
| 447 | err = &OnchainError{err: errors.Errorf(": %w", err), Idx: idx} |
| 448 | } else { |
| 449 | |
| 450 | e.logger.Info(fmt.Sprintf("SignalUnregister %x", tx.Hash())) |
| 451 | } |
| 452 | } |
| 453 | if err != nil { |
| 454 | e.logger.Error(err) |
| 455 | } |
| 456 | return |
| 457 | } |
| 458 | return e.waitForReply(&request{opCtx: opCtx, f: f, reply: make(chan *response)}) |
| 459 | } |
| 460 | |
| 461 | func (e *ethAdaptor) StartCommitReveal(startBlock int64, commitDuration int64, revealDuration int64, revealThreshold int64) (err error) { |
| 462 | if !e.isConnecting() { |
nothing calls this directly
no test coverage detected