Skip to content

client/core: fix incorrect fill amount when missing inactive matches#564

Closed
chappjc wants to merge 1 commit into
decred:masterfrom
chappjc:partial-fill-missing-inactive-matches
Closed

client/core: fix incorrect fill amount when missing inactive matches#564
chappjc wants to merge 1 commit into
decred:masterfrom
chappjc:partial-fill-missing-inactive-matches

Conversation

@chappjc
Copy link
Copy Markdown
Member

@chappjc chappjc commented Jul 22, 2020

When dexc is restarted with a partially filled order where the previous
match(es) that partially filled the order are inactive, the fill amount
computation in (*trackedTrade).negotiate was incorrect.

This change adds the filled quantity for new matches rather than trying
to recompute and set the whole match amount.

(*trackedTrade).negotiate now attempts to process all matches even if
one of them fails for some reason.

…e matches

When dexc is restarted with a partially filled order where the previous
match(es) that partially filled the order are inactive, the fill amount
computation in (*trackedTrade).negotiate was incorrect.

This change adds the filled quantity for new matches rather than trying
to recompute and set the whole match amount.

(*trackedTrade).negotiate now attempts to process all matches even if
one of them fails for some reason.
@buck54321
Copy link
Copy Markdown
Member

LOL. I'm working on a solution for this today to. We can compare in a minute.

@chappjc
Copy link
Copy Markdown
Member Author

chappjc commented Jul 22, 2020

Closing in favor of #566 since loading all the inactive matches for active orders has other potential benefits. I still prefer using AddFill to SetFill, but it's not important to the fix.

@chappjc chappjc closed this Jul 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants