Skip to content

Commit f9a5d1b

Browse files
tsachihermancce
authored andcommitted
fix regression (algorand#3029)
## Summary This PR addresses a regression introduced in algorand#2983. The culprit is that an interface might contain a nil pointer, which makes it insufficient to test the interface pointer itself. Fail cases: https://app.circleci.com/pipelines/github/algorand/go-algorand/2451/workflows/8807ced7-89ae-4b6b-96b0-1bc5bdf9d84c/jobs/27259/tests#failed-test-0 ## Test Plan Use existing unit testing. In particular TestCatchupOverGossip.
1 parent 7cf4fc6 commit f9a5d1b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

data/pools/transactionPool.go

+4
Original file line numberDiff line numberDiff line change
@@ -679,6 +679,10 @@ func (pool *TransactionPool) recomputeBlockEvaluator(committedTxIds map[transact
679679
}
680680
pool.pendingBlockEvaluator, err = pool.ledger.StartEvaluator(next.BlockHeader, hint)
681681
if err != nil {
682+
// The pendingBlockEvaluator is an interface, and in case of an evaluator error
683+
// we want to remove the interface itself rather then keeping an interface
684+
// to a nil.
685+
pool.pendingBlockEvaluator = nil
682686
var nonSeqBlockEval ledgercore.ErrNonSequentialBlockEval
683687
if errors.As(err, &nonSeqBlockEval) {
684688
if nonSeqBlockEval.EvaluatorRound <= nonSeqBlockEval.LatestRound {

0 commit comments

Comments
 (0)