Skip to content

Commit

Permalink
[CT-968] Fix snapshot validation by including subaccounts from propos…
Browse files Browse the repository at this point in the history
…ed operation queue (#2142)
  • Loading branch information
dydxwill authored and jonfung-dydx committed Sep 17, 2024
1 parent a00ddb9 commit 5ccf033
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions protocol/x/clob/keeper/process_operations.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,14 @@ func (k Keeper) ProcessProposerOperations(
}
k.SendOrderbookUpdates(ctx, allUpdates)

// send local subaccount snapshots
subaccountIdsToUpdate := fetchSubaccountIdsInvolvedInOpQueue(
subaccountIdsFromProposed := fetchSubaccountIdsInvolvedInOpQueue(
operations,
)

subaccountIdsFromLocal := fetchSubaccountIdsInvolvedInOpQueue(
localValidatorOperationsQueue,
)
subaccountIdsToUpdate := lib.MergeMaps(subaccountIdsFromLocal, subaccountIdsFromProposed)
allSubaccountUpdates := make([]satypes.StreamSubaccountUpdate, 0)
for subaccountId := range subaccountIdsToUpdate {
subaccountUpdate := k.subaccountsKeeper.GetStreamSubaccountUpdate(ctx, subaccountId, false)
Expand Down

0 comments on commit 5ccf033

Please sign in to comment.