From 48419a3152dc1b2c4075082a6977b2cd4ecd4b93 Mon Sep 17 00:00:00 2001 From: Tsachi Herman Date: Thu, 23 Sep 2021 10:22:39 -0400 Subject: [PATCH] fix EvalForIndexer --- ledger/evalIndexer.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ledger/evalIndexer.go b/ledger/evalIndexer.go index c139c39add..35bff13eb0 100644 --- a/ledger/evalIndexer.go +++ b/ledger/evalIndexer.go @@ -213,11 +213,10 @@ func EvalForIndexer(il indexerLedgerForEval, block *bookkeeping.Block, proto con fmt.Errorf("EvalForIndexer() err: %w", err) } - err = eval.finalValidation() - if err != nil { - return ledgercore.StateDelta{}, []transactions.SignedTxnInBlock{}, - fmt.Errorf("EvalForIndexer() err: %w", err) - } + // here, in the EvalForIndexer, we don't want to call finalValidation(). This would + // skip the calculation of the account totals in the state delta, which is a serious + // issue if it were to be used by algod, but it's perfectly fine for the indexer since + // it doesn't track any totals and therefore cannot calculate the new totals. return eval.state.deltas(), eval.block.Payset, nil }