Skip to content
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

feat(p2p): replace order in single packet #1812

Merged
merged 1 commit into from
Aug 17, 2020
Merged

Commits on Aug 14, 2020

  1. 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.
    sangaman committed Aug 14, 2020
    Configuration menu
    Copy the full SHA
    9dd6be1 View commit details
    Browse the repository at this point in the history