Skip to content

Commit 7f39a41

Browse files
committed
rename for clarity
1 parent ffc9ff4 commit 7f39a41

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

block/internal/submitting/submitter.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -337,9 +337,9 @@ func (s *Submitter) processDAInclusionLoop() {
337337

338338
s.logger.Debug().Uint64("height", nextHeight).Msg("advancing DA included height")
339339

340-
// Set sequencer height to DA height mapping using already retrieved data
341-
if err := s.setSequencerHeightToDAHeight(s.ctx, nextHeight, header, data, currentDAIncluded == 0); err != nil {
342-
s.logger.Error().Err(err).Uint64("height", nextHeight).Msg("failed to set sequencer height to DA height mapping")
340+
// Set node height to DA height mapping using already retrieved data
341+
if err := s.setNodeHeightToDAHeight(s.ctx, nextHeight, header, data, currentDAIncluded == 0); err != nil {
342+
s.logger.Error().Err(err).Uint64("height", nextHeight).Msg("failed to set node height to DA height mapping")
343343
break
344344
}
345345

@@ -427,14 +427,14 @@ func (s *Submitter) sendCriticalError(err error) {
427427
}
428428
}
429429

430-
// setSequencerHeightToDAHeight stores the mapping from a ev-node block height to the corresponding
430+
// setNodeHeightToDAHeight stores the mapping from a ev-node block height to the corresponding
431431
// DA (Data Availability) layer heights where the block's header and data were included.
432432
// This mapping is persisted in the store metadata and is used to track which DA heights
433433
// contain the block components for a given ev-node height.
434434
//
435435
// For blocks with empty transactions, both header and data use the same DA height since
436436
// empty transaction data is not actually published to the DA layer.
437-
func (s *Submitter) setSequencerHeightToDAHeight(ctx context.Context, height uint64, header *types.SignedHeader, data *types.Data, genesisInclusion bool) error {
437+
func (s *Submitter) setNodeHeightToDAHeight(ctx context.Context, height uint64, header *types.SignedHeader, data *types.Data, genesisInclusion bool) error {
438438
headerHash, dataHash := header.Hash(), data.DACommitment()
439439

440440
headerDaHeightBytes := make([]byte, 8)

block/internal/submitting/submitter_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -191,10 +191,10 @@ func TestSubmitter_setSequencerHeightToDAHeight(t *testing.T) {
191191
mockStore.On("SetMetadata", mock.Anything, dataKey, dBz).Return(nil).Once()
192192
mockStore.On("SetMetadata", mock.Anything, store.GenesisDAHeightKey, gBz).Return(nil).Once()
193193

194-
require.NoError(t, s.setSequencerHeightToDAHeight(ctx, 1, h, d, true))
194+
require.NoError(t, s.setNodeHeightToDAHeight(ctx, 1, h, d, true))
195195
}
196196

197-
func TestSubmitter_setSequencerHeightToDAHeight_Errors(t *testing.T) {
197+
func TestSubmitter_setNodeHeightToDAHeight_Errors(t *testing.T) {
198198
ctx := t.Context()
199199
cm, st := newTestCacheAndStore(t)
200200

@@ -205,11 +205,11 @@ func TestSubmitter_setSequencerHeightToDAHeight_Errors(t *testing.T) {
205205
// No cache entries -> expect error on missing header
206206
_, ok := cm.GetHeaderDAIncluded(h.Hash().String())
207207
assert.False(t, ok)
208-
assert.Error(t, s.setSequencerHeightToDAHeight(ctx, 1, h, d, false))
208+
assert.Error(t, s.setNodeHeightToDAHeight(ctx, 1, h, d, false))
209209

210210
// Add header, missing data
211211
cm.SetHeaderDAIncluded(h.Hash().String(), 10, 1)
212-
assert.Error(t, s.setSequencerHeightToDAHeight(ctx, 1, h, d, false))
212+
assert.Error(t, s.setNodeHeightToDAHeight(ctx, 1, h, d, false))
213213
}
214214

215215
func TestSubmitter_initializeDAIncludedHeight(t *testing.T) {

0 commit comments

Comments
 (0)