Skip to content

Commit

Permalink
CR rename
Browse files Browse the repository at this point in the history
  • Loading branch information
jannotti committed May 8, 2024
1 parent 8e306a6 commit 64ff41b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ledger/eval/eval.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ type roundCowBase struct {
// The online accounts that we've already accessed during this round evaluation. This is a
// cache used to avoid looking up the same account data more than once during a single evaluator
// execution. The OnlineAccountData is historical and therefore won't be changing.
voters map[basics.Address]basics.OnlineAccountData
onlineAccounts map[basics.Address]basics.OnlineAccountData

// totalOnline is the cached amount of online stake for rnd (so it's from
// rnd-320). The zero value indicates it is not yet cached.
Expand All @@ -162,7 +162,7 @@ func makeRoundCowBase(l LedgerForCowBase, rnd basics.Round, txnCount uint64, sta
stateProofNextRnd: stateProofNextRnd,
proto: proto,
accounts: make(map[basics.Address]ledgercore.AccountData),
voters: make(map[basics.Address]basics.OnlineAccountData),
onlineAccounts: make(map[basics.Address]basics.OnlineAccountData),
appParams: make(map[ledgercore.AccountApp]cachedAppParams),
assetParams: make(map[ledgercore.AccountAsset]cachedAssetParams),
appLocalStates: make(map[ledgercore.AccountApp]cachedAppLocalState),
Expand Down Expand Up @@ -220,7 +220,7 @@ func (x *roundCowBase) balanceRound() (basics.Round, error) {
// lookupAgreement returns the online accountdata for the provided account address. It uses an internal cache
// to avoid repeated lookups against the ledger.
func (x *roundCowBase) lookupAgreement(addr basics.Address) (basics.OnlineAccountData, error) {
if accountData, found := x.voters[addr]; found {
if accountData, found := x.onlineAccounts[addr]; found {
return accountData, nil

Check warning on line 224 in ledger/eval/eval.go

View check run for this annotation

Codecov / codecov/patch

ledger/eval/eval.go#L222-L224

Added lines #L222 - L224 were not covered by tests
}

Expand All @@ -233,7 +233,7 @@ func (x *roundCowBase) lookupAgreement(addr basics.Address) (basics.OnlineAccoun
return basics.OnlineAccountData{}, err

Check warning on line 233 in ledger/eval/eval.go

View check run for this annotation

Codecov / codecov/patch

ledger/eval/eval.go#L231-L233

Added lines #L231 - L233 were not covered by tests
}

x.voters[addr] = ad
x.onlineAccounts[addr] = ad
return ad, err

Check warning on line 237 in ledger/eval/eval.go

View check run for this annotation

Codecov / codecov/patch

ledger/eval/eval.go#L236-L237

Added lines #L236 - L237 were not covered by tests
}

Expand Down

0 comments on commit 64ff41b

Please sign in to comment.