You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: block/internal/da/forced_inclusion_retriever.go
+26-7Lines changed: 26 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,7 @@ package da
2
2
3
3
import (
4
4
"context"
5
+
"encoding/binary"
5
6
"errors"
6
7
"fmt"
7
8
"time"
@@ -10,6 +11,7 @@ import (
10
11
11
12
datypes "github.com/evstack/ev-node/pkg/da/types"
12
13
"github.com/evstack/ev-node/pkg/genesis"
14
+
"github.com/evstack/ev-node/pkg/store"
13
15
"github.com/evstack/ev-node/types"
14
16
)
15
17
@@ -20,6 +22,7 @@ var ErrForceInclusionNotConfigured = errors.New("forced inclusion namespace not
20
22
typeForcedInclusionRetrieverstruct {
21
23
clientClient
22
24
logger zerolog.Logger
25
+
store store.Store
23
26
daEpochSizeuint64
24
27
daStartHeightuint64
25
28
}
@@ -36,24 +39,30 @@ type ForcedInclusionEvent struct {
36
39
funcNewForcedInclusionRetriever(
37
40
clientClient,
38
41
genesis genesis.Genesis,
42
+
store store.Store,
39
43
logger zerolog.Logger,
40
44
) *ForcedInclusionRetriever {
41
-
return&ForcedInclusionRetriever{
42
-
client: client,
43
-
daStartHeight: genesis.DAStartHeight, // TODO: this should be genesis da start height (for full nodes) or store metadata da start height (for sequencers)
epochStart, epochEnd, currentEpochNumber:=types.CalculateEpochBoundaries(daHeight, r.daStartHeight/* this should be fetch from store once */, r.daEpochSize)
0 commit comments