Skip to content

Commit 17429d5

Browse files
Enable totals calculation in eval for indexer. (#3124)
Enable totals calculation in eval for indexer
1 parent 28e9eca commit 17429d5

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

ledger/internal/evalindexer.go

+5-4
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,11 @@ func (eval *BlockEvaluator) ProcessBlockForIndexer(block *bookkeeping.Block) (le
4747
fmt.Errorf("ProcessBlockForIndexer() err: %w", err)
4848
}
4949

50-
// here, in the EvalForIndexer, we don't want to call finalValidation(). This would
51-
// skip the calculation of the account totals in the state delta, which is a serious
52-
// issue if it were to be used by algod, but it's perfectly fine for the indexer since
53-
// it doesn't track any totals and therefore cannot calculate the new totals.
50+
err = eval.finalValidation()
51+
if err != nil {
52+
return ledgercore.StateDelta{}, []transactions.SignedTxnInBlock{},
53+
fmt.Errorf("ProcessBlockForIndexer() err: %w", err)
54+
}
5455

5556
return eval.state.deltas(), eval.block.Payset, nil
5657
}

0 commit comments

Comments
 (0)