Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 34 additions & 12 deletions .github/workflows/reviewdog.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: "ReviewDog workflow"
env:
GOLANGCI_LINT_VERSION: "v2.5.0"
GOLANGCI_LINT_VERSION: "v2.5.1-0.20251021235302-b99da877a247"
on:
push:
branches:
Expand All @@ -23,17 +23,39 @@ jobs:
# move go out of the way temporarily to avoid "go list ./..." from installing modules
- name: Make libsodium.a
run: sudo mv /usr/bin/go /usr/bin/go.bak && make libsodium && sudo mv /usr/bin/go.bak /usr/bin/go
- name: reviewdog-golangci-lint
uses: reviewdog/action-golangci-lint@v2.8.0
with:
go_version_file: go.mod
golangci_lint_version: ${{ env.GOLANGCI_LINT_VERSION }}
golangci_lint_flags: "-c .golangci.yml --allow-parallel-runners"
reporter: "github-pr-check"
tool_name: "Lint Errors"
level: "error"
fail_level: any
filter_mode: "nofilter"
- name: Add bin to PATH
run: |
echo "$GITHUB_WORKSPACE/bin" >> $GITHUB_PATH
echo "$RUNNER_WORKSPACE/$(basename $GITHUB_REPOSITORY)/bin" >> $GITHUB_PATH
- name: Set up Go
uses: ./.github/actions/setup-go
- name: Install golangci-lint
run: |
go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@${{ env.GOLANGCI_LINT_VERSION }}
golangci-lint --version
- name: Install reviewdog
run: |
curl -sfL https://raw.githubusercontent.com/reviewdog/reviewdog/v0.21.0/install.sh | sh -s -- v0.21.0
reviewdog --version
- name: Run golangci-lint with reviewdog
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -e

golangci-lint run \
--output.text.path stdout \
-c .golangci.yml \
--issues-exit-code 0 \
--allow-parallel-runners > temp_golangci-lint-errors.txt

cat temp_golangci-lint-errors.txt | reviewdog \
-f=golangci-lint \
-name="Lint Errors" \
-reporter=github-pr-check \
-filter-mode=nofilter \
-fail-level=any \
-level=error
# Non-Blocking Warnings Section
reviewdog-warnings:
runs-on: ubuntu-latest
Expand Down
8 changes: 7 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ linters:
default: none
enable:
- copyloopvar
- dupword
- errcheck
- govet
- ineffassign
Expand All @@ -18,6 +19,10 @@ linters:
- unused

settings:
dupword:
comments-only: true
ignore:
- long # "long long" is OK
errcheck:
exclude-functions:
# We do this 121 times and never check the error.
Expand All @@ -28,6 +33,8 @@ linters:
# Enables these linters in addition to the default ones.
enable:
- shadow
disable:
- buildtag
settings:
printf:
# Comma-separated list of print function names to check (in addition to default, see `go tool vet help printf`).
Expand Down Expand Up @@ -89,7 +96,6 @@ linters:
linters:
- errcheck
- ineffassign
- misspell
- nolintlint
- staticcheck
- unused
Expand Down
2 changes: 1 addition & 1 deletion agreement/state_machine_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ func (blackhole) Write(data []byte) (int, error) {
return len(data), nil
}

// deterministicTraceTestCase encapsulates a traditional unit test test case.
// deterministicTraceTestCase encapsulates a traditional unit test case.
type determisticTraceTestCase struct {
inputs []event
expectedOutputs []event
Expand Down
2 changes: 1 addition & 1 deletion catchup/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1088,7 +1088,7 @@ func TestServiceLedgerUnavailable(t *testing.T) {
require.Less(t, local.LastRound(), remote.LastRound())
}

// TestServiceNoBlockForRound checks if fetchAndWrite does not repeats 500 times if a block not avaialble
// TestServiceNoBlockForRound checks if fetchAndWrite does not repeats 500 times if a block not available
func TestServiceNoBlockForRound(t *testing.T) {
partitiontest.PartitionTest(t)

Expand Down
2 changes: 1 addition & 1 deletion config/localTemplate.go
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ type Local struct {
// determining the source of a connection. If used, it should be set to the string "X-Forwarded-For", unless the
// proxy vendor provides another header field. In the case of CloudFlare proxy, the "CF-Connecting-IP" header
// field can be used.
// This setting does not support multiple X-Forwarded-For HTTP headers or multiple values in in the header and always uses the last value
// This setting does not support multiple X-Forwarded-For HTTP headers or multiple values in the header and always uses the last value
// from the last X-Forwarded-For HTTP header that corresponds to a single reverse proxy (even if it received the request from another reverse proxy or adversary node).
//
// WARNING: By enabling this option, you are trusting peers to provide accurate forwarding addresses.
Expand Down
2 changes: 1 addition & 1 deletion crypto/merklearray/merkle_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ func TestSizeLimitsMerkle(t *testing.T) {
for depth := uint64(0); depth < uint64(18); depth = depth + increment {
size := uint64(1) << depth

// eltCoefficient is the coefficent to determine how many elements are in the proof.
// eltCoefficient is the coefficient to determine how many elements are in the proof.
// There will be 1/eltCoefficient elements of all possible element (2^treeDepth)
// numElts = 2^(depth-eltCoefficient)

Expand Down
6 changes: 3 additions & 3 deletions crypto/multisig_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ func TestMoreThanMaxSigsInMultisig(t *testing.T) {
}

msig, err := MultisigAssemble(sigs)
require.NoError(t, err, "Multisig: error assmeble multisig")
require.NoError(t, err, "Multisig: error assemble multisig")
err = MultisigVerify(txid, addr, msig)
require.Error(t, err, "Multisig: did not return error as expected")
br := MakeBatchVerifier()
Expand Down Expand Up @@ -346,7 +346,7 @@ func TestOneSignatureIsEmpty(t *testing.T) {
}

msig, err := MultisigAssemble(sigs)
require.NoError(t, err, "Multisig: error assmeble multisig")
require.NoError(t, err, "Multisig: error assemble multisig")
msig.Subsigs[0].Sig = Signature{}
err = MultisigVerify(txid, addr, msig)
require.Error(t, err, "Multisig: did not return error as expected")
Expand Down Expand Up @@ -386,7 +386,7 @@ func TestOneSignatureIsInvalid(t *testing.T) {

sigs[1].Subsigs[1].Sig[5] = sigs[1].Subsigs[1].Sig[5] + 1
msig, err := MultisigAssemble(sigs)
require.NoError(t, err, "Multisig: error assmeble multisig")
require.NoError(t, err, "Multisig: error assemble multisig")
err = MultisigVerify(txid, addr, msig)
require.Error(t, err, "Multisig: did not return error as expected")
br := MakeBatchVerifier()
Expand Down
2 changes: 1 addition & 1 deletion daemon/algod/api/server/v1/routes/routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
)

// V1Routes contains all routes for v1
// v1 algod paths will route to the sunset message, resulting in a 410 Gone response.
// These algod paths will route to the sunset message, resulting in a 410 Gone response.
var V1Routes = lib.Routes{
lib.Route{
Name: "status",
Expand Down
2 changes: 1 addition & 1 deletion daemon/kmd/api/v1/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ type reqContext struct {
sm *session.Manager
}

// errorResponse sets the specified status code (should != 200), and fills in the
// errorResponse sets the specified status code (should != 200), and fills in
// the response envelope by setting Error to true and a Message to the passed
// user-readable error message.
func errorResponse(w http.ResponseWriter, status int, err error) {
Expand Down
2 changes: 1 addition & 1 deletion daemon/kmd/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ func (k KMDConfig) Validate() error {
return nil
}

// LoadKMDConfig tries to read the the kmd configuration from disk, merging the
// LoadKMDConfig tries to read the kmd configuration from disk, merging the
// default kmd configuration with what it finds
func LoadKMDConfig(dataDir string) (cfg KMDConfig, err error) {
cfg = defaultConfig(dataDir)
Expand Down
2 changes: 1 addition & 1 deletion daemon/kmd/wallet/driver/sqlite_crypto.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ func decryptBlobWithPassword(blob []byte, ptType plaintextType, password []byte)
// extractKeyWithIndex accepts the master derivation key and an index which
// specifies the key to be derived
func extractKeyWithIndex(derivationKey []byte, index uint64) (pk crypto.PublicKey, sk crypto.PrivateKey, err error) {
// The info tag is just the the utf-8 string representation of the index
// The info tag is just the utf-8 string representation of the index
info := []byte(fmt.Sprintf(hkdfInfoFormat, index))

// We can skip hkdf.Extract since our key is long and uniformly random
Expand Down
2 changes: 1 addition & 1 deletion data/accountManager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ func testAccountManagerKeys(t *testing.T, registry account.ParticipationRegistry
<-keyDeletionDone
testDuration := time.Since(testStartTime)
t.Logf("testDuration %v keysTotalDuration %v\n", testDuration, keysTotalDuration)
require.Lessf(t, keysTotalDuration, testDuration/100, fmt.Sprintf("the time to aquire the keys via Keys() was %v whereas blocking on keys deletion took %v", keysTotalDuration, testDuration))
require.Lessf(t, keysTotalDuration, testDuration/100, fmt.Sprintf("the time to acquire the keys via Keys() was %v whereas blocking on keys deletion took %v", keysTotalDuration, testDuration))
t.Logf("Calling AccountManager.Keys() while AccountManager.DeleteOldKeys() was busy, 10 times in a row, resulted in accumulated delay of %v\n", keysTotalDuration)
}

Expand Down
2 changes: 1 addition & 1 deletion data/appRateLimiter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ func TestAppRateLimiter_IntervalSkip(t *testing.T) {
now := time.Date(2023, 9, 11, 10, 10, 11, 0, time.UTC).UnixNano() // 11 sec => 1 sec into the interval

// fill 80% of the current interval
// switch to the next next interval
// switch to the next interval
// ensure all capacity is available

for i := 0; i < int(0.8*float64(rate)); i++ {
Expand Down
2 changes: 1 addition & 1 deletion data/basics/userBalance.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ type AccountData struct {
Assets map[AssetIndex]AssetHolding `codec:"asset,allocbound=bounds.EncodedMaxAssetsPerAccount"`

// AuthAddr is the address against which signatures/multisigs/logicsigs should be checked.
// If empty, the address of the account whose AccountData this is is used.
// If empty, the address of the account whose AccountData this is used.
// A transaction may change an account's AuthAddr to "re-key" the account.
// This allows key rotation, changing the members in a multisig, etc.
AuthAddr Address `codec:"spend"`
Expand Down
2 changes: 1 addition & 1 deletion data/pools/transactionPool.go
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@ func (pool *TransactionPool) addToPendingBlockEvaluatorOnce(txgroup []transactio
pool.assemblyMu.Lock()
defer pool.assemblyMu.Unlock()
if evalRnd := pool.pendingBlockEvaluator.Round(); pool.assemblyRound > evalRnd {
// the block we're assembling now isn't the one the the AssembleBlock is waiting for. While it would be really cool
// the block we're assembling now isn't the one the AssembleBlock is waiting for. While it would be really cool
// to finish generating the block, it would also be pointless to spend time on it.
// we're going to set the ok and assemblyCompletedOrAbandoned to "true" so we can complete this loop asap
pool.assemblyResults.ok = true
Expand Down
2 changes: 1 addition & 1 deletion data/pools/transactionPool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1546,7 +1546,7 @@ func TestStateProofLogging(t *testing.T) {
_, err = transactionPool.AssembleBlock(514, time.Time{})
require.NoError(t, err)

// parse the log messages and retreive the Metrics for SP in assmbe block
// parse the log messages and retrieve the Metrics for SP in assemble block
scanner := bufio.NewScanner(strings.NewReader(buf.String()))
lines := make([]string, 0)
for scanner.Scan() {
Expand Down
2 changes: 1 addition & 1 deletion data/transactions/logic/assembler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3560,7 +3560,7 @@ add:
exp(3, "Cannot create label with same name as macro: coolLabel"),
)
testProg(t, `#define 👩 123`, AssemblerMaxVersion, exp(1, "👩 character not allowed in macro name"))
// These two tests are just for coverage, they really really can't happen
// These two tests are just for coverage, they really can't happen
ops := newOpStream(AssemblerMaxVersion)
err := define(&ops, []token{{str: "not#define"}})
require.EqualError(t, err, "0: invalid syntax: not#define")
Expand Down
2 changes: 1 addition & 1 deletion data/transactions/logic/crypto_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ func TestMimc(t *testing.T) {
// output does not change under the hood with new versions.
//
// We test that malformed inputs panic, in particular we test malfornmed inputs of:
// 0 length, lenghts not multiple of 32 bytes, chunks representing values greater than the modulus.
// 0 length, lengths not multiple of 32 bytes, chunks representing values greater than the modulus.
// We test that well formed inputs hash correctly, testing both single chunk inputs (32-byte) and
// multiple chunk inputs (96 bytes).
partitiontest.PartitionTest(t)
Expand Down
4 changes: 2 additions & 2 deletions data/transactions/logic/eval.go
Original file line number Diff line number Diff line change
Expand Up @@ -3956,7 +3956,7 @@ func opGetBit(cx *EvalContext) error {
var bit uint64
if target.avmType() == avmUint64 {
if idx > 63 {
return errors.New("getbit index > 63 with with Uint")
return errors.New("getbit index > 63 with Uint")
}
mask := uint64(1) << idx
bit = (target.Uint & mask) >> idx
Expand Down Expand Up @@ -4686,7 +4686,7 @@ func opAppGlobalDel(cx *EvalContext) error {
}

// We have a difficult naming problem here. Some opcodes allow (and used to
// require) ASAs and Apps to to be referenced by their "index" in an app call
// require) ASAs and Apps to be referenced by their "index" in an app call
// txn's foreign-apps or foreign-assets arrays. That was a small integer, no
// more than 2 or so, and was often called an "index". But it was not a
// basics.AssetIndex or basics.ApplicationIndex.
Expand Down
6 changes: 3 additions & 3 deletions data/transactions/logic/evalAppTxn_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ func TestFieldTypes(t *testing.T) {
TestApp(t, NoTrack("itxn_begin; int 7; itxn_field Receiver;"), ep, "not an address")
TestApp(t, NoTrack("itxn_begin; byte \"\"; itxn_field CloseRemainderTo;"), ep, "not an address")
TestApp(t, NoTrack("itxn_begin; byte \"\"; itxn_field AssetSender;"), ep, "not an address")
// can't really tell if it's an addres, so 32 bytes gets further
// can't really tell if it's an address, so 32 bytes gets further
TestApp(t, "itxn_begin; byte \"01234567890123456789012345678901\"; itxn_field AssetReceiver; int 1",
ep, "unavailable Account")
// but a b32 string rep is not an account
Expand Down Expand Up @@ -1897,7 +1897,7 @@ func TestTxIDAndGroupIDCalculation(t *testing.T) {
})
require.Equal(t, crypto.Digest{0x96, 0x90, 0x1, 0x64, 0x24, 0xa5, 0xda, 0x4, 0x3d, 0xd, 0x40, 0xc9, 0xf6, 0xfa, 0xc3, 0xa6, 0x26, 0x19, 0xd3, 0xf0, 0xb7, 0x28, 0x87, 0xf8, 0x5a, 0xd1, 0xa7, 0xbc, 0x1d, 0xad, 0x8b, 0xfc}, gcBCDgroup)
} else {
// these calculations are "wrong," but they're here to maintain backwards compatability with the original implementation
// these calculations are "wrong," but they're here to maintain backwards compatibility with the original implementation

gcAAtxid = actual[grandchildAAIndex].txn.InnerID(childAtxn.ID(), 0)
require.Equal(t, transactions.Txid{0xb5, 0xa, 0x16, 0x90, 0x78, 0x21, 0xf6, 0x96, 0x1b, 0x9c, 0x72, 0x5e, 0xf4, 0x8b, 0xe7, 0xb8, 0x2b, 0xd, 0x74, 0xd4, 0x71, 0xa2, 0x43, 0xb0, 0xfc, 0x19, 0xbc, 0x1c, 0xda, 0x95, 0x8f, 0xd0}, gcAAtxid)
Expand Down Expand Up @@ -2276,7 +2276,7 @@ func TestInnerTxIDCalculation(t *testing.T) {
gcBDtxid = actual[grandchildBDIndex].txn.InnerID(childBtxid, 3)
require.Equal(t, transactions.Txid{0xcd, 0x15, 0x47, 0x3f, 0x42, 0xf5, 0x9c, 0x4a, 0x11, 0xa4, 0xe3, 0x92, 0x30, 0xf, 0x97, 0x1d, 0x3b, 0x1, 0x7, 0xbc, 0x1f, 0x3f, 0xcc, 0x9d, 0x43, 0x5b, 0xb2, 0xa4, 0x15, 0x8b, 0x89, 0x4e}, gcBDtxid)
} else {
// these calculations are "wrong," but they're here to maintain backwards compatability with the original implementation
// these calculations are "wrong," but they're here to maintain backwards compatibility with the original implementation

childAtxid = childAtxn.ID()
require.Equal(t, transactions.Txid{0xc9, 0xa4, 0x41, 0xff, 0x9c, 0x62, 0x40, 0x6e, 0x63, 0xd9, 0x5, 0x19, 0x3b, 0x32, 0x43, 0x3d, 0xba, 0x80, 0x9f, 0xa3, 0xe4, 0xed, 0x2f, 0xa4, 0x19, 0x2b, 0x3f, 0x21, 0x96, 0xe2, 0xec, 0x21}, childAtxid)
Expand Down
4 changes: 2 additions & 2 deletions data/transactions/logic/evalStateful_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ func testAppFull(t *testing.T, program []byte, gi int, aid basics.AppIndex, ep *
// that something STOPS working as of a particular version. Note that this does
// *not* use different consensus versions. It is tempting to make it find the
// lowest possible consensus version in the loop in order to support the `v` it
// it working on. For super confidence, one might argue this should be a nested
// is working on. For super confidence, one might argue this should be a nested
// loop over all of the consensus versions that work with the `v`, from the
// first possible, to vFuture.
func testLogicRange(t *testing.T, start, stop int, test func(t *testing.T, ep *EvalParams, tx *transactions.Transaction, ledger *Ledger)) {
Expand Down Expand Up @@ -1107,7 +1107,7 @@ int 4141
==
`
// check that even during application creation (Txn.ApplicationID == 0)
// we will use the the kvCow if the exact application ID (100) is
// we will use the kvCow if the exact application ID (100) is
// specified in the transaction
now.TxnGroup[0].Txn.ApplicationID = 0
now.TxnGroup[0].Txn.ForeignApps = []basics.AppIndex{100}
Expand Down
2 changes: 1 addition & 1 deletion data/transactions/logic/eval_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func makeTestProto(opts ...protoOpt) *config.ConsensusParams {

// With the addition of itxn_field, itxn_submit, which rely on
// machinery outside logic package for validity checking, we
// need a more realistic set of consensus paramaters.
// need a more realistic set of consensus parameters.
Asset: true,
MaxAssetNameBytes: 12,
MaxAssetUnitNameBytes: 6,
Expand Down
4 changes: 2 additions & 2 deletions data/txHandler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2491,7 +2491,7 @@ func TestTxHandlerRestartWithBacklogAndTxPool(t *testing.T) { //nolint:parallelt

inputGoodTxnCount := len(signedTransactionGroups) - len(badTxnGroups)
tp := handler.txPool
// Wait untill all the expected transactions are in the pool
// Wait until all the expected transactions are in the pool
for x := 0; x < 100; x++ {
if len(tp.PendingTxGroups()) == inputGoodTxnCount {
break
Expand Down Expand Up @@ -2918,7 +2918,7 @@ func TestTxHandlerErlClientMapper(t *testing.T) {
// TestTxHandlerERLIPClient checks that ERL properly handles sender with the same and different addresses:
// Configure ERL in following way:
// 1. Small maxCapacity=10 fully shared by two IP senders (TxBacklogReservedCapacityPerPeer=5, IncomingConnectionsLimit=0)
// 2. Submit one from both IP senders to initalize per peer-queues and exhaust shared capacity
// 2. Submit one from both IP senders to initialize per peer-queues and exhaust shared capacity
// 3. Make sure the third peer does not come through
// 4. Make sure extra messages from the first peer and second peer are accepted
func TestTxHandlerERLIPClient(t *testing.T) {
Expand Down
4 changes: 3 additions & 1 deletion ledger/acctdeltas_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1806,7 +1806,7 @@ func compactResourcesDeltasPermutations(a *require.Assertions, crd compactResour
// Investigation shown there was another account YF5GJTPPMOUPU2GRGGVP2PGJTQZWGSWZISFHNIKDJSZ2CDPPWN4KKKYVQE
// opted in into the same app 22045503. During the commit range the following happened:
// at 16541783 YF5 made a payment txn (one acct delta)
// at 16541785 RGJ has been funded and and opted in into app 22045503 (one acct delta, one res delta)
// at 16541785 RGJ has been funded and opted in into app 22045503 (one acct delta, one res delta)
// at 16541788 YF5 address had clear state txn for 22045503, and close out txn for the entire account (one acct delta, one res delta)
// Because YF5 had modifications before RGJ, all its acct deltas were compacted into a single entry before RGJ (delete, create)
// In the same time, the order in resources delta remained the same (opt-in, delete).
Expand Down Expand Up @@ -2776,6 +2776,8 @@ func TestAccountOnlineRoundParams(t *testing.T) {
// onlineAccountsDelete(2): A online
// onlineAccountsDelete(3): A offline, B online
// etc
//
//nolint:dupword // ignore
func TestOnlineAccountsDeletion(t *testing.T) {
partitiontest.PartitionTest(t)

Expand Down
1 change: 1 addition & 0 deletions ledger/acctonline.go
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,7 @@ func (ao *onlineAccounts) consecutiveVersion(offset uint64) uint64 {
if ao.onlineRoundParamsData[startIndex+1].CurrentProtocol != ao.onlineRoundParamsData[startIndex+int(offset)].CurrentProtocol {
// find the tip point.
tipPoint := sort.Search(int(offset), func(i int) bool {
//nolint:dupword // ignore
// we're going to search here for version inequality, with the assumption that consensus versions won't repeat.
// that allow us to support [ver1, ver1, ..., ver2, ver2, ..., ver3, ver3] but not [ver1, ver1, ..., ver2, ver2, ..., ver1, ver3].
return ao.onlineRoundParamsData[startIndex+1].CurrentProtocol != ao.onlineRoundParamsData[startIndex+1+i].CurrentProtocol
Expand Down
2 changes: 1 addition & 1 deletion ledger/acctonline_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ func TestAcctOnline(t *testing.T) {
require.NoError(t, err)
require.Empty(t, oad)
}
// check next next account
// check next-next account
// for the account 2, it set to Offline at round 3
// at round 1 + 1 = 2 it online and should te correctly retrieved from DB and lookup
nextNextAcctIdx := nextAcctIdx + 1
Expand Down
Loading