-
Notifications
You must be signed in to change notification settings - Fork 658
Order fill events notified before order creation events #1277
Copy link
Copy link
Open
Labels
2a Discussion NeededPrompt for team to discuss at next stand up.Prompt for team to discuss at next stand up.3d BugClassification indicating the existing implementation does not match the intention of the designClassification indicating the existing implementation does not match the intention of the design4b Normal PriorityPriority indicating the moderate impact to system/user -OR- existing workaround is costly to performPriority indicating the moderate impact to system/user -OR- existing workaround is costly to perform6 APIImpact flag identifying the application programing interface (API)Impact flag identifying the application programing interface (API)bug
Milestone
Metadata
Metadata
Assignees
Labels
2a Discussion NeededPrompt for team to discuss at next stand up.Prompt for team to discuss at next stand up.3d BugClassification indicating the existing implementation does not match the intention of the designClassification indicating the existing implementation does not match the intention of the design4b Normal PriorityPriority indicating the moderate impact to system/user -OR- existing workaround is costly to performPriority indicating the moderate impact to system/user -OR- existing workaround is costly to perform6 APIImpact flag identifying the application programing interface (API)Impact flag identifying the application programing interface (API)bug
Bug Description
A client that subscribed to a market always receives order fill events before order creation events if the orders are partially filled in a same block. Note: no notification on order creation if it gets completely filled in same block (not sure if it need to be fixed so far).
There is a
FIXMEin code:bitshares-core/libraries/app/database_api.cpp
Lines 2311 to 2313 in d94cc57
Probably because
on_applied_block()is called beforeon_objects_changed():bitshares-core/libraries/chain/db_block.cpp
Lines 540 to 544 in d94cc57
Expected Behavior
When a new order is placed, clients receive an order creation event first, then an order fill event.
Additional Context (optional)
I'm not sure if it's safe to simply move
on_objects_changed()to be called beforeon_applied_block().Impacts
Describe which portion(s) of BitShares Core may be impacted by this bug. Please tick at least one box.
CORE TEAM TASK LIST