Skip to content

Commit 8960a88

Browse files
committed
clear more fields
1 parent 99dfa1a commit 8960a88

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

accounting/rewind.go

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,13 @@ func AccountAtRound(ctx context.Context, account models.Account, round uint64, d
152152
case sdk.ApplicationCallTx:
153153
// We can't rewind app calls, so null out application state.
154154
acct.AppsLocalState = nil
155+
acct.AppsTotalExtraPages = nil
156+
acct.AppsTotalSchema = nil
155157
acct.CreatedApps = nil
158+
acct.TotalAppsOptedIn = 0
159+
acct.TotalBoxBytes = 0
160+
acct.TotalBoxes = 0
161+
acct.TotalCreatedApps = 0
156162
case sdk.AssetConfigTx:
157163
if stxn.Txn.ConfigAsset == 0 {
158164
// create asset, unwind the application of the value
@@ -188,8 +194,13 @@ func AccountAtRound(ctx context.Context, account models.Account, round uint64, d
188194
// MinBalance is not supported.
189195
acct.MinBalance = 0
190196

191-
// TODO: Clear out the closed-at field as well. Like Rewards we cannot know this value for all accounts.
192-
//acct.ClosedAt = 0
197+
// Clear out the closed-at field as well. Like Rewards we cannot know this value for all accounts.
198+
acct.ClosedAtRound = nil
199+
200+
// Clear out incentives fields, they change according to block header data, not transactions
201+
acct.IncentiveEligible = nil
202+
acct.LastHeartbeat = nil
203+
acct.LastProposed = nil
193204

194205
return
195206
}

0 commit comments

Comments
 (0)