未验证 提交 1ed13279 编写于 作者: A Andrianto Lie 提交者: GitHub

Fix partially filled existing order

Fix problem when a matching results in a partially filled existing order, the existing order and the bidder/ asker balance are not updated properly.
上级 1aa61283
......@@ -173,6 +173,8 @@ void apply_exchange_buy( buy_order order ) {
}
seller_account = get_account( lowest_ask.seller.name );
} else {
asks::update( lowest_ask );
save( seller_account );
break; // buyer's bid should be filled
}
}
......@@ -234,6 +236,8 @@ void apply_exchange_sell( sell_order order ) {
}
buyer_account = get_account( highest_bid.buyer.name );
} else {
bids::update( highest_bid );
save( buyer_account );
break; // buyer's bid should be filled
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册