Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

roundCowBase: use lookup() instead of going to ledger directly #3173

Merged
merged 1 commit into from
Nov 3, 2021
Merged
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
6 changes: 3 additions & 3 deletions ledger/internal/eval.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ func (x *roundCowBase) blockHdr(r basics.Round) (bookkeeping.BlockHeader, error)
}

func (x *roundCowBase) allocated(addr basics.Address, aidx basics.AppIndex, global bool) (bool, error) {
acct, _, err := x.l.LookupWithoutRewards(x.rnd, addr)
acct, err := x.lookup(addr)
if err != nil {
return false, err
}
Expand All @@ -181,7 +181,7 @@ func (x *roundCowBase) allocated(addr basics.Address, aidx basics.AppIndex, glob
// getKey gets the value for a particular key in some storage
// associated with an application globally or locally
func (x *roundCowBase) getKey(addr basics.Address, aidx basics.AppIndex, global bool, key string, accountIdx uint64) (basics.TealValue, bool, error) {
ad, _, err := x.l.LookupWithoutRewards(x.rnd, addr)
ad, err := x.lookup(addr)
if err != nil {
return basics.TealValue{}, false, err
}
Expand Down Expand Up @@ -211,7 +211,7 @@ func (x *roundCowBase) getKey(addr basics.Address, aidx basics.AppIndex, global
// getStorageCounts counts the storage types used by some account
// associated with an application globally or locally
func (x *roundCowBase) getStorageCounts(addr basics.Address, aidx basics.AppIndex, global bool) (basics.StateSchema, error) {
ad, _, err := x.l.LookupWithoutRewards(x.rnd, addr)
ad, err := x.lookup(addr)
if err != nil {
return basics.StateSchema{}, err
}
Expand Down