From b60fb449bfe69db8837881fc339e64f80f0fd006 Mon Sep 17 00:00:00 2001 From: Andrea V <1577639+karimodm@users.noreply.github.com> Date: Wed, 18 Oct 2023 17:26:55 +0200 Subject: [PATCH] Cancel pending clock tasks --- pkg/protocol/engine/clock/blocktime/clock.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/protocol/engine/clock/blocktime/clock.go b/pkg/protocol/engine/clock/blocktime/clock.go index bcc3e983c..f2159b98b 100644 --- a/pkg/protocol/engine/clock/blocktime/clock.go +++ b/pkg/protocol/engine/clock/blocktime/clock.go @@ -38,7 +38,7 @@ func NewProvider(opts ...options.Option[Clock]) module.Provider[*engine.Engine, return options.Apply(&Clock{ acceptedTime: NewRelativeTime(), confirmedTime: NewRelativeTime(), - workerPool: e.Workers.CreatePool("Clock", workerpool.WithWorkerCount(1)), + workerPool: e.Workers.CreatePool("Clock", workerpool.WithWorkerCount(1), workerpool.WithCancelPendingTasksOnShutdown(true)), }, opts, func(c *Clock) { e.HookConstructed(func() { latestCommitmentIndex := e.Storage.Settings().LatestCommitment().Slot()