MCPcopy Create free account
hub / github.com/DOSNetwork/core / SignalGroupFormation

Method SignalGroupFormation

onchain/eth_set.go:335–364  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

333}
334
335func (e *ethAdaptor) SignalGroupFormation() (err error) {
336 if !e.isConnecting() {
337 err = errors.New("not connecting to geth")
338 return
339 }
340
341 // define how to parse parameters and execute proxy function
342 opCtx, opCancel := context.WithTimeout(e.ctx, e.setTimeout)
343 defer opCancel()
344 proxies := e.proxies
345
346 f := func(ctx context.Context) (tx *types.Transaction, err error) {
347 idx := getIndex(ctx)
348 if idx == -1 {
349 err = errors.New("no client index in context")
350 } else {
351 tx, err = proxies[idx].SignalGroupFormation()
352 if err != nil {
353 err = &OnchainError{err: errors.Errorf(": %w", err), Idx: idx}
354 } else {
355 e.logger.Info(fmt.Sprintf("SignalGroupFormation %x", tx.Hash()))
356 }
357 }
358 if err != nil {
359 e.logger.Error(err)
360 }
361 return
362 }
363 return e.waitForReply(&request{opCtx: opCtx, f: f, reply: make(chan *response)})
364}
365
366func (e *ethAdaptor) SignalGroupDissolve() (err error) {
367 if !e.isConnecting() {

Callers

nothing calls this directly

Calls 8

isConnectingMethod · 0.95
waitForReplyMethod · 0.95
getIndexFunction · 0.85
NewMethod · 0.65
SignalGroupFormationMethod · 0.65
InfoMethod · 0.65
ErrorMethod · 0.65
HashMethod · 0.45

Tested by

no test coverage detected