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

Method SignalBootstrap

onchain/eth_set.go:397–427  ·  view source on GitHub ↗
(cid *big.Int)

Source from the content-addressed store, hash-verified

395}
396
397func (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
429func (e *ethAdaptor) SignalUnregister(addr common.Address) (err error) {
430 if !e.isConnecting() {

Callers

nothing calls this directly

Calls 8

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

Tested by

no test coverage detected