func (cfg EmitIntervals) RandomizeEmitTime(r *rand.Rand) EmitIntervals {
	config := cfg
	if config.Max > 10 {
		config.Max = config.Max - config.Max/10 + time.Duration(r.Int63n(int64(config.Max/10)))
	}
	if config.DoublesignProtection > 3 {
		config.DoublesignProtection = config.DoublesignProtection + time.Duration(r.Int63n(int64(config.DoublesignProtection/3)))
	}
	return config
}
RandomizeEmitTime and return new config
package emitter
import (
	"math/rand"
	"time"
	"github.com/Fantom-foundation/lachesis-base/inter/idx"
	"github.com/ethereum/go-ethereum/params"
	"github.com/Fantom-foundation/go-opera/inter/validatorpk"
	"github.com/Fantom-foundation/go-opera/opera"
)
type EmitIntervals struct {
	Min                        time.Duration
	Max                        time.Duration
	Confirming                 time.Duration  
	ParallelInstanceProtection time.Duration
	DoublesignProtection       time.Duration
}
type ValidatorConfig struct {
	ID     idx.ValidatorID
	PubKey validatorpk.PubKey
}
type PrevEmittedEventFile struct {
	Path     string
	SyncMode bool
}
type Config struct {
	VersionToPublish string
	Validator ValidatorConfig
	EmitIntervals EmitIntervals  
	MaxTxsPerAddress int
	MaxParents idx.Event
	LimitedTpsThreshold uint64
	NoTxsThreshold      uint64
	EmergencyThreshold  uint64
	TxsCacheInvalidation time.Duration
	PrevEmittedEventFile PrevEmittedEventFile
}
func DefaultConfig() Config {
	return Config{
		VersionToPublish: params.VersionWithMeta(),
		EmitIntervals: EmitIntervals{
			Min:                        110 * time.Millisecond,
			Max:                        10 * time.Minute,
			Confirming:                 120 * time.Millisecond,
			DoublesignProtection:       27 * time.Minute,  
			ParallelInstanceProtection: 1 * time.Minute,
		},
		MaxTxsPerAddress: TxTurnNonces,
		MaxParents: 0,
		LimitedTpsThreshold: opera.DefaultEventGas * 120,
		NoTxsThreshold:      opera.DefaultEventGas * 30,
		EmergencyThreshold:  opera.DefaultEventGas * 5,
		TxsCacheInvalidation: 200 * time.Millisecond,
	}
}