From c698661f7feb907796944768108a40266d8a00a8 Mon Sep 17 00:00:00 2001 From: Sina Mahmoodi Date: Fri, 3 Apr 2026 00:15:49 +0200 Subject: [PATCH] Fix balance change txindex check --- core/types/bal/bal_encoding.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/types/bal/bal_encoding.go b/core/types/bal/bal_encoding.go index 0029d5d668..6f1c6187ed 100644 --- a/core/types/bal/bal_encoding.go +++ b/core/types/bal/bal_encoding.go @@ -367,7 +367,7 @@ func (e *AccountAccess) validate(blockTxCount int) error { return errors.New("balance changes not in ascending order by tx index") } - if len(e.BalanceChanges) > 0 && int(e.BalanceChanges[len(e.BalanceChanges)-1].TxIdx) > blockTxCount+2 { + if len(e.BalanceChanges) > 0 && int(e.BalanceChanges[len(e.BalanceChanges)-1].TxIdx) >= blockTxCount+2 { return errors.New("highest balance change index beyond what is allowed") } // check that the balance values are set and there are no duplicate index entries