-
Notifications
You must be signed in to change notification settings - Fork 132
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
[CT-856] Add order replacement to fix vault causing orderbook flickering #1602
Merged
+164
−58
Merged
Changes from 1 commit
Commits
Show all changes
57 commits
Select commit
Hold shift + click to select a range
2196eb5
order replacement messages for vault
chenyaoy 53f021b
fix tests
chenyaoy feddcca
fix
chenyaoy e087c19
publish protocol image
chenyaoy 557be43
Merge branch 'main' into chenyao/order-replacement-messages-for-vault
chenyaoy 751bae7
Merge branch 'main' into chenyao/order-replacement-messages-for-vault
chenyaoy 5f3e64e
clean up test
chenyaoy b534c21
Merge branch 'main' into chenyao/order-replacement-messages-for-vault
chenyaoy 92e19d3
Add new metric
chenyaoy 078b321
Add metric
chenyaoy 83cc892
temp metrics change
chenyaoy fc81475
Revert "temp metrics change"
chenyaoy a35fe85
get cancelled order placement to get correct subticks
chenyaoy ff5df30
Merge branch 'main' into chenyao/order-replacement-messages-for-vault
chenyaoy a114fac
fix
chenyaoy 0ae3f40
Fix order removal reason
chenyaoy adddd22
change back vault order ID
chenyaoy be7e698
send replacement order message from vault
chenyaoy 1f18e20
update proto
chenyaoy 31acb76
update proto
chenyaoy 176d37c
ender stateful order replacement handler
chenyaoy 062ff0d
update sql handler
chenyaoy c43565a
vulcan order replace handler
chenyaoy 4d13eb5
comment
chenyaoy c1388bb
lint proto
chenyaoy 23f0c10
fix sql script
chenyaoy 6ea9d26
fix test
chenyaoy 6f0ab7d
fix
chenyaoy 66a55c9
clean
chenyaoy cf1f888
revert
chenyaoy fe03736
refactor
chenyaoy 7a2afea
remove
chenyaoy 8dee4c9
add tests
chenyaoy 53fe081
fix test
chenyaoy 915e31f
lint
chenyaoy e4bb2dd
undo
chenyaoy 15061e2
fix
chenyaoy 25a445e
compare subticks instead of price
chenyaoy 1489677
add log
chenyaoy b332cd9
Merge branch 'main' into chenyao/order-replacement-messages-for-vault
chenyaoy e99086c
fix comparison
chenyaoy 366e7de
Merge branch 'main' into chenyao/order-replacement-messages-for-vault
chenyaoy 747ffaa
Merge branch 'main' into chenyao/order-replacement-messages-for-vault
chenyaoy 4f0415e
address comments
chenyaoy a61803a
Merge branch 'main' into chenyao/order-replacement-messages-for-vault
chenyaoy aff6855
ci
chenyaoy 4ca5ed4
fix
chenyaoy 060ba2e
add vulcan test
chenyaoy 27641a4
address comment
chenyaoy 2993902
lint
chenyaoy e2f6aa1
address comments
chenyaoy ee19948
fix
chenyaoy dbb28d8
simplify
chenyaoy 5c6f5ba
Test vault indexer events
chenyaoy 2be3558
lint
chenyaoy 61022c6
Merge branch 'main' into chenyao/order-replacement-messages-for-vault
chenyaoy 4e6c761
pull out indexer changes
chenyaoy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
publish protocol image
commit e087c19d0a3cc3c33c0c21b2e15e50e681a92c20
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,6 @@ func (k Keeper) RefreshAllVaultOrders(ctx sdk.Context) { | |
defer totalSharesIterator.Close() | ||
for ; totalSharesIterator.Valid(); totalSharesIterator.Next() { | ||
vaultId, err := types.GetVaultIdFromStateKey(totalSharesIterator.Key()) | ||
fmt.Printf("vaultId: %+v\n", vaultId) | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider adding metrics or more detailed logging for vaults that are skipped. This could provide better visibility into the operation of this function, especially when diagnosing issues in production environments. |
||
if err != nil { | ||
log.ErrorLogWithError(ctx, "Failed to get vault ID from state key", err) | ||
|
@@ -36,7 +35,6 @@ func (k Keeper) RefreshAllVaultOrders(ctx sdk.Context) { | |
var totalShares types.NumShares | ||
k.cdc.MustUnmarshal(totalSharesIterator.Value(), &totalShares) | ||
|
||
fmt.Printf("totalShares: %+v\n", totalShares) | ||
// Skip if TotalShares is non-positive. | ||
if totalShares.NumShares.Sign() <= 0 { | ||
continue | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: remove