func (s *Service) getGeneration(ctx context.Context, account string) (*generation, error) {
	span, _ := opentracing.StartSpanFromContext(ctx, "services.process.getGeneration")
	defer span.Finish()
	generator, exists := s.generations[account]
	if !exists {
		return nil, ErrNotFound
	}
	if time.Since(generator.processStarted) > 10*time.Second {
		log.Debug().Str("account", account).Msg("Generation been active too long; invalidating")
		delete(s.generations, account)
		return nil, ErrNotFound
	}
	return generator, nil
}
getGeneration fetches an active generation.
This assumes that a write lock is already held on generationsMu.
package standard
import (
	"context"
	"time"
	"github.com/attestantio/dirk/core"
	"github.com/herumi/bls-eth-go-binary/bls"
	"github.com/opentracing/opentracing-go"
	"github.com/pkg/errors"
)
var ErrNotFound = errors.New("not found")
var ErrInProgress = errors.New("in progress")
var ErrNotInProgress = errors.New("not in progress")
var ErrNotCreated = errors.New("not created")
type generation struct {
	processStarted time.Time
	id             uint64
	account      string
	passphrase   []byte
	threshold    uint32
	participants []*core.Endpoint
	distributionSecrets map[uint64]bls.SecretKey
	sharedSecrets map[uint64]bls.SecretKey
	sharedVVecs   map[uint64][]bls.PublicKey
}