()
| 302 | } |
| 303 | |
| 304 | func (e *ethAdaptor) SignalRandom() (err error) { |
| 305 | if !e.isConnecting() { |
| 306 | err = errors.New("not connecting to geth") |
| 307 | return |
| 308 | } |
| 309 | |
| 310 | // define how to parse parameters and execute proxy function |
| 311 | opCtx, opCancel := context.WithTimeout(e.ctx, e.setTimeout) |
| 312 | defer opCancel() |
| 313 | proxies := e.proxies |
| 314 | |
| 315 | f := func(ctx context.Context) (tx *types.Transaction, err error) { |
| 316 | idx := getIndex(ctx) |
| 317 | if idx == -1 { |
| 318 | err = errors.New("no client index in context") |
| 319 | } else { |
| 320 | tx, err = proxies[idx].SignalRandom() |
| 321 | if err != nil { |
| 322 | err = &OnchainError{err: errors.Errorf(": %w", err), Idx: idx} |
| 323 | } else { |
| 324 | e.logger.Info(fmt.Sprintf("SignalRandom %x", tx.Hash())) |
| 325 | } |
| 326 | } |
| 327 | if err != nil { |
| 328 | e.logger.Error(err) |
| 329 | } |
| 330 | return |
| 331 | } |
| 332 | return e.waitForReply(&request{opCtx: opCtx, f: f, reply: make(chan *response)}) |
| 333 | } |
| 334 | |
| 335 | func (e *ethAdaptor) SignalGroupFormation() (err error) { |
| 336 | if !e.isConnecting() { |
nothing calls this directly
no test coverage detected