@@ -15,10 +15,9 @@ import (
15
15
"github.com/filecoin-project/go-f3/internal/clock"
16
16
"github.com/filecoin-project/go-f3/internal/psutil"
17
17
"github.com/filecoin-project/go-f3/manifest"
18
- "go.opentelemetry.io/otel/metric"
19
-
20
18
pubsub "github.com/libp2p/go-libp2p-pubsub"
21
19
peer "github.com/libp2p/go-libp2p/core/peer"
20
+ "go.opentelemetry.io/otel/metric"
22
21
"go.uber.org/multierr"
23
22
"golang.org/x/sync/errgroup"
24
23
)
@@ -428,7 +427,7 @@ func (h *gpbftHost) collectChain(base ec.TipSet, head ec.TipSet) ([]ec.TipSet, e
428
427
return res [1 :], nil
429
428
}
430
429
431
- func (h * gpbftRunner ) Stop (_ctx context.Context ) error {
430
+ func (h * gpbftRunner ) Stop (context.Context ) error {
432
431
h .ctxCancel ()
433
432
return multierr .Combine (
434
433
h .errgrp .Wait (),
@@ -624,7 +623,7 @@ func (h *gpbftHost) SetAlarm(at time.Time) {
624
623
// we cannot reuse the timer because we don't know if it was read or not
625
624
h .alertTimer .Stop ()
626
625
if at .IsZero () {
627
- // It "at" is zero, we cancel the timer entirely. Unfortunately, we still have to
626
+ // If "at" is zero, we cancel the timer entirely. Unfortunately, we still have to
628
627
// replace it for the reason stated above.
629
628
h .alertTimer = h .clock .Timer (0 )
630
629
if ! h .alertTimer .Stop () {
@@ -650,6 +649,11 @@ func (h *gpbftHost) ReceiveDecision(decision *gpbft.Justification) (time.Time, e
650
649
log .Error (err )
651
650
return time.Time {}, err
652
651
}
652
+ if err := h .ec .Finalize (h .runningCtx , cert .ECChain .Head ().Key ); err != nil {
653
+ err := fmt .Errorf ("error while finalizing decision at EC: %w" , err )
654
+ log .Error (err )
655
+ return time.Time {}, err
656
+ }
653
657
return (* gpbftRunner )(h ).computeNextInstanceStart (cert ), nil
654
658
}
655
659
0 commit comments