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

Method SignalUnregister

onchain/eth_set.go:429–459  ·  view source on GitHub ↗
(addr common.Address)

Source from the content-addressed store, hash-verified

427}
428
429func (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
461func (e *ethAdaptor) StartCommitReveal(startBlock int64, commitDuration int64, revealDuration int64, revealThreshold int64) (err error) {
462 if !e.isConnecting() {

Callers

nothing calls this directly

Calls 8

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

Tested by

no test coverage detected