()
| 205 | } |
| 206 | |
| 207 | func (e *ethAdaptor) LastGroupFormationRequestId() (result uint64, err error) { |
| 208 | if !e.isConnecting() { |
| 209 | err = errors.New("not connecting to geth") |
| 210 | } |
| 211 | proxies := e.proxies |
| 212 | f := func(ctx context.Context) (chan interface{}, chan error) { |
| 213 | outc := make(chan interface{}) |
| 214 | errc := make(chan error) |
| 215 | go func() { |
| 216 | defer close(outc) |
| 217 | defer close(errc) |
| 218 | idx := getIndex(ctx) |
| 219 | if idx == -1 { |
| 220 | err = errors.New("no client index in context") |
| 221 | } else { |
| 222 | if val, err := proxies[idx].LastFormGrpReqId(); err != nil { |
| 223 | replyError(ctx, errc, &OnchainError{err: errors.Errorf("get err : %w", err), Idx: idx}) |
| 224 | } else { |
| 225 | utils.ReportResult(ctx, outc, val) |
| 226 | } |
| 227 | } |
| 228 | }() |
| 229 | return outc, errc |
| 230 | } |
| 231 | var r interface{} |
| 232 | if r, err = e.get(f); err != nil { |
| 233 | return |
| 234 | } |
| 235 | if v, ok := r.(*big.Int); ok { |
| 236 | result = v.Uint64() |
| 237 | } else { |
| 238 | err = errors.New("casting error") |
| 239 | } |
| 240 | return |
| 241 | } |
| 242 | |
| 243 | func (e *ethAdaptor) LastUpdatedBlock() (result uint64, err error) { |
| 244 | if !e.isConnecting() { |
nothing calls this directly
no test coverage detected