Skip to content

Commit ed6b6d8

Browse files
abitmorepmconrad
authored andcommitted
Cancel force-settlement order when offset is 100%
1 parent ff65d06 commit ed6b6d8

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

libraries/chain/db_update.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,13 @@ void database::clear_expired_orders()
379379
cancel_settle_order(order);
380380
continue;
381381
}
382+
if( GRAPHENE_100_PERCENT == mia.options.force_settlement_offset_percent ) // settle something for nothing
383+
{
384+
ilog( "Canceling a force settlement in ${asset} because settlement offset is 100%",
385+
("asset", mia_object.symbol));
386+
cancel_settle_order(order);
387+
continue;
388+
}
382389
if( max_settlement_volume.asset_id != current_asset )
383390
max_settlement_volume = mia_object.amount(mia.max_force_settlement_volume(mia_object.dynamic_data(*this).current_supply));
384391
// When current_asset_finished is true, this would be the 2nd time processing the same order.

0 commit comments

Comments
 (0)