Skip to content

Commit 1ba8c3a

Browse files
authored
fix: call Header.Height as function in logger (cosmos#723)
Fixes cosmos#722.
1 parent 2fc700d commit 1ba8c3a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

block/manager.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ func (m *Manager) SyncLoop(ctx context.Context, cancel context.CancelFunc) {
238238
block := blockEvent.block
239239
daHeight := blockEvent.daHeight
240240
m.logger.Debug("block body retrieved from DALC",
241-
"height", block.Header.Height,
241+
"height", block.Header.Height(),
242242
"daHeight", daHeight,
243243
"hash", block.Hash(),
244244
)
@@ -557,14 +557,14 @@ func (m *Manager) publishBlock(ctx context.Context) error {
557557
}
558558

559559
func (m *Manager) submitBlockToDA(ctx context.Context, block *types.Block) error {
560-
m.logger.Info("submitting block to DA layer", "height", block.Header.Height)
560+
m.logger.Info("submitting block to DA layer", "height", block.Header.Height())
561561

562562
submitted := false
563563
backoff := initialBackoff
564564
for attempt := 1; ctx.Err() == nil && !submitted && attempt <= maxSubmitAttempts; attempt++ {
565565
res := m.dalc.SubmitBlock(ctx, block)
566566
if res.Code == da.StatusSuccess {
567-
m.logger.Info("successfully submitted Rollkit block to DA layer", "rollkitHeight", block.Header.Height, "daHeight", res.DAHeight)
567+
m.logger.Info("successfully submitted Rollkit block to DA layer", "rollkitHeight", block.Header.Height(), "daHeight", res.DAHeight)
568568
submitted = true
569569
} else {
570570
m.logger.Error("DA layer submission failed", "error", res.Message, "attempt", attempt)

da/mock/mock.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ func (m *DataAvailabilityLayerClient) Stop() error {
7373
// triggers a state transition in the DA layer.
7474
func (m *DataAvailabilityLayerClient) SubmitBlock(ctx context.Context, block *types.Block) da.ResultSubmitBlock {
7575
daHeight := atomic.LoadUint64(&m.daHeight)
76-
m.logger.Debug("Submitting block to DA layer!", "height", block.Header.Height, "dataLayerHeight", daHeight)
76+
m.logger.Debug("Submitting block to DA layer!", "height", block.Header.Height(), "dataLayerHeight", daHeight)
7777

7878
hash := block.Header.Hash()
7979
blob, err := block.MarshalBinary()

0 commit comments

Comments
 (0)