@@ -445,13 +445,13 @@ func (a *StoreAdapter[H]) Get(ctx context.Context, hash header.Hash) (H, error)
445445 // First try the store
446446 item , err := a .getter .GetByHash (ctx , hash )
447447 if err == nil {
448- a .applyDAHint (item )
448+ a .applyDAHint (ctx , item )
449449 return item , nil
450450 }
451451
452452 // Check pending items using hash index for O(1) lookup
453453 if pendingItem , ok := a .pending .getByHash (hash ); ok {
454- a .applyDAHint (pendingItem )
454+ a .applyDAHint (ctx , pendingItem )
455455 return pendingItem , nil
456456 }
457457
@@ -485,21 +485,21 @@ func (a *StoreAdapter[H]) getByHeightNoWait(ctx context.Context, height uint64)
485485 // First try the store
486486 item , err := a .getter .GetByHeight (ctx , height )
487487 if err == nil {
488- a .applyDAHint (item )
488+ a .applyDAHint (ctx , item )
489489 return item , nil
490490 }
491491
492492 // Check pending items
493493 if pendingItem , ok := a .pending .get (height ); ok {
494- a .applyDAHint (pendingItem )
494+ a .applyDAHint (ctx , pendingItem )
495495 return pendingItem , nil
496496 }
497497
498498 return zero , header .ErrNotFound
499499}
500500
501501// applyDAHint sets the DA hint on the item from cache or disk.
502- func (a * StoreAdapter [H ]) applyDAHint (item H ) {
502+ func (a * StoreAdapter [H ]) applyDAHint (ctx context. Context , item H ) {
503503 if item .IsZero () {
504504 return
505505 }
@@ -513,7 +513,7 @@ func (a *StoreAdapter[H]) applyDAHint(item H) {
513513 }
514514
515515 // Try to load from disk
516- if diskHint , err := a .getter .GetDAHint (context . Background () , height ); err == nil && diskHint > 0 {
516+ if diskHint , err := a .getter .GetDAHint (ctx , height ); err == nil && diskHint > 0 {
517517 a .pending .setDAHint (height , diskHint )
518518 item .SetDAHint (diskHint )
519519 }
0 commit comments