Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions indexer/execution/txindexer/process_blocks.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ func (t *TxIndexer) processElBlock(ref *BlockRef) (*blockStats, error) {
// They must be committed even if the current block's resolution failed.
var balanceCommitCallback dbCommitCallback
if t.balanceLookup != nil && t.balanceLookup.HasPendingLookups() {
balanceCtx, balanceCancel := context.WithTimeout(t.ctx, 30*time.Second)
balanceCtx, balanceCancel := context.WithTimeout(t.ctx, 45*time.Second)
callback, balanceErr := t.balanceLookup.ProcessPendingLookups(balanceCtx)
balanceCancel()

Expand All @@ -232,7 +232,7 @@ func (t *TxIndexer) processElBlock(ref *BlockRef) (*blockStats, error) {
// If block resolution failed, still commit pending balance lookups, then return error
if blockErr != nil {
if balanceCommitCallback != nil {
balCommitCtx, balCommitCancel := context.WithTimeout(t.ctx, 30*time.Second)
balCommitCtx, balCommitCancel := context.WithTimeout(t.ctx, 45*time.Second)
commitErr := db.RunDBTransaction(func(tx *sqlx.Tx) error {
return balanceCommitCallback(balCommitCtx, tx)
})
Expand All @@ -246,7 +246,7 @@ func (t *TxIndexer) processElBlock(ref *BlockRef) (*blockStats, error) {
}

// Phase 5: Commit to database (fresh context, independent of earlier phases)
commitCtx, commitCancel := context.WithTimeout(t.ctx, 30*time.Second)
commitCtx, commitCancel := context.WithTimeout(t.ctx, 45*time.Second)
defer commitCancel()

// Update procCtx to use commit context for getBalanceUpdates (reads from DB)
Expand Down