adjust coalescer delays

This commit is contained in:
vyzo 2023-03-13 11:44:10 +02:00
parent bda7ef52da
commit a11032b10a
2 changed files with 9 additions and 3 deletions

View File

@ -53,9 +53,9 @@ const (
// coalescer configuration (TODO: use observer instead) // coalescer configuration (TODO: use observer instead)
var ( var (
coalesceMinDelay = 100 * time.Millisecond coalesceMinDelay = time.Second
coalesceMaxDelay = time.Second coalesceMaxDelay = 15 * time.Second
coalesceMergeInterval = 100 * time.Millisecond coalesceMergeInterval = time.Second
) )
// chain store interface; we could use store.ChainStore directly, // chain store interface; we could use store.ChainStore directly,

View File

@ -198,6 +198,12 @@ var rng *rand.Rand
func init() { func init() {
systemAddr, _ = address.NewIDAddress(0) systemAddr, _ = address.NewIDAddress(0)
rng = rand.New(rand.NewSource(314159)) rng = rand.New(rand.NewSource(314159))
// adjust those to make tests snappy
coalesceMinDelay = time.Millisecond
coalesceMaxDelay = 10 * time.Millisecond
coalesceMergeInterval = time.Millisecond
} }
func newMockChainStore() *mockChainStore { func newMockChainStore() *mockChainStore {