[chore] move PopulateAccountStats() nil check often performed into function itself (#3158)

* move PopulateAccountStats() nil check often performed into function itself

* fix test to take in mind we don't repopulate account stats if not-nil
This commit is contained in:
kim 2024-08-02 12:15:11 +00:00 committed by GitHub
commit 0f734a2410
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 53 additions and 78 deletions

View file

@ -743,6 +743,10 @@ func (suite *AccountTestSuite) TestAccountStatsAll() {
suite.FailNow(err.Error())
}
// Nil out account stats to allow
// db to refetch + regenerate them.
account.Stats = nil
// Get stats for a third time, they
// should get regenerated now, but
// only for local accounts.