-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(p2p): replace order in single packet
This modifies the procedure for replacing an order in the order book. Previously, it would go like this: 1. Remove old order & send order invalidation to peers. 2. Place new order and wait for matching to complete (which may take some time if it involves swap attempts). 3. Send new order to peers. Now it goes: 1. Put the old order on hold, preventing further swaps/matching. 2. Place the new order and wait for matching to complete. 3. Remove the old order from the order book. 4. Send a single packet to peers with new order info and old order id. 5. Peers that receive this packet will remove the old order and add the new one sequentially. By default, replaced orders will have the same local order id as the order they are replacing unless a different id is specified. Closes #1805. Closes #1806.
- Loading branch information
Showing
14 changed files
with
396 additions
and
86 deletions.
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
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
Oops, something went wrong.