Apply suggestion from @jwasinger

This commit is contained in:
jwasinger 2026-03-27 12:44:13 -04:00 committed by GitHub
parent ddb521e0d2
commit bf53d63b3e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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+1 {
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