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

Method SetGroupSize

onchain/eth_set.go:107–137  ·  view source on GitHub ↗
(g uint64)

Source from the content-addressed store, hash-verified

105}
106
107func (e *ethAdaptor) SetGroupSize(g uint64) (err error) {
108 if !e.isConnecting() {
109 err = errors.New("not connecting to geth")
110 return
111 }
112
113 // define how to parse parameters and execute proxy function
114 opCtx, opCancel := context.WithTimeout(e.ctx, e.setTimeout)
115 defer opCancel()
116 proxies := e.proxies
117 groupSize := new(big.Int).SetUint64(g)
118
119 f := func(ctx context.Context) (tx *types.Transaction, err error) {
120 idx := getIndex(ctx)
121 if idx == -1 {
122 err = errors.New("no client index in context")
123 } else {
124 tx, err = proxies[idx].SetGroupSize(groupSize)
125 if err != nil {
126 err = &OnchainError{err: errors.Errorf(": %w", err), Idx: idx}
127 } else {
128 e.logger.Info(fmt.Sprintf("SetGroupSize %x", tx.Hash()))
129 }
130 }
131 if err != nil {
132 e.logger.Error(err)
133 }
134 return
135 }
136 return e.waitForReply(&request{opCtx: opCtx, f: f, reply: make(chan *response)})
137}
138
139func (e *ethAdaptor) UpdateRandomness(sign *vss.Signature) (err error) {
140 if !e.isConnecting() {

Callers

nothing calls this directly

Calls 9

isConnectingMethod · 0.95
waitForReplyMethod · 0.95
getIndexFunction · 0.85
SetUint64Method · 0.80
NewMethod · 0.65
SetGroupSizeMethod · 0.65
InfoMethod · 0.65
ErrorMethod · 0.65
HashMethod · 0.45

Tested by

no test coverage detected