(g uint64)
| 105 | } |
| 106 | |
| 107 | func (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 | |
| 139 | func (e *ethAdaptor) UpdateRandomness(sign *vss.Signature) (err error) { |
| 140 | if !e.isConnecting() { |
nothing calls this directly
no test coverage detected