@@ -139,52 +139,52 @@ BOOST_AUTO_TEST_CASE(limit_order_update_test)
139
139
BOOST_REQUIRE_EQUAL (order_id (db).expiration .sec_since_epoch (), expiration.sec_since_epoch ());
140
140
141
141
// Cannot update order without changing anything
142
- GRAPHENE_REQUIRE_THROW (update_limit_order (order_id), fc::assert_exception );
142
+ GRAPHENE_REQUIRE_THROW (update_limit_order (order_id), fc::exception );
143
143
// Cannot update order to use inverted price assets
144
- GRAPHENE_REQUIRE_THROW (update_limit_order (order_id, price (bitusd.amount (2 ), asset (1 ))), fc::assert_exception );
144
+ GRAPHENE_REQUIRE_THROW (update_limit_order (order_id, price (bitusd.amount (2 ), asset (1 ))), fc::exception );
145
145
// Cannot update order to use negative price
146
- GRAPHENE_REQUIRE_THROW (update_limit_order (order_id, price (asset (-1 ), bitusd.amount (2 ))), fc::assert_exception );
147
- GRAPHENE_REQUIRE_THROW (update_limit_order (order_id, price (asset (1 ), bitusd.amount (-2 ))), fc::assert_exception );
146
+ GRAPHENE_REQUIRE_THROW (update_limit_order (order_id, price (asset (-1 ), bitusd.amount (2 ))), fc::exception );
147
+ GRAPHENE_REQUIRE_THROW (update_limit_order (order_id, price (asset (1 ), bitusd.amount (-2 ))), fc::exception );
148
148
// Cannot update order to use different assets
149
149
GRAPHENE_REQUIRE_THROW (update_limit_order (order_id, price (bitusd.amount (2 ), munee.amount (1 ))),
150
- fc::assert_exception );
150
+ fc::exception );
151
151
GRAPHENE_REQUIRE_THROW (update_limit_order (order_id, price (munee.amount (2 ), bitusd.amount (1 ))),
152
- fc::assert_exception );
153
- GRAPHENE_REQUIRE_THROW (update_limit_order (order_id, price (asset (2 ), munee.amount (1 ))), fc::assert_exception );
152
+ fc::exception );
153
+ GRAPHENE_REQUIRE_THROW (update_limit_order (order_id, price (asset (2 ), munee.amount (1 ))), fc::exception );
154
154
// Cannot update order to expire in the past
155
- GRAPHENE_REQUIRE_THROW (update_limit_order (order_id, {}, {}, db.head_block_time () - 10 ), fc::assert_exception );
155
+ GRAPHENE_REQUIRE_THROW (update_limit_order (order_id, {}, {}, db.head_block_time () - 10 ), fc::exception );
156
156
// Cannot update order with a zero delta
157
- GRAPHENE_REQUIRE_THROW (update_limit_order (order_id, {}, asset ()), fc::assert_exception );
157
+ GRAPHENE_REQUIRE_THROW (update_limit_order (order_id, {}, asset ()), fc::exception );
158
158
// Cannot update order to add more funds than seller has
159
- GRAPHENE_REQUIRE_THROW (update_limit_order (order_id, {}, asset (501 )), fc::assert_exception );
159
+ GRAPHENE_REQUIRE_THROW (update_limit_order (order_id, {}, asset (501 )), fc::exception );
160
160
// Cannot update order to remove more funds than order has
161
- GRAPHENE_REQUIRE_THROW (update_limit_order (order_id, {}, asset (-501 )), fc::assert_exception );
161
+ GRAPHENE_REQUIRE_THROW (update_limit_order (order_id, {}, asset (-501 )), fc::exception );
162
162
// Cannot update order to remove all funds in order
163
- GRAPHENE_REQUIRE_THROW (update_limit_order (order_id, {}, asset (-500 )), fc::assert_exception );
163
+ GRAPHENE_REQUIRE_THROW (update_limit_order (order_id, {}, asset (-500 )), fc::exception );
164
164
// Cannot update order to add or remove different kind of funds
165
- GRAPHENE_REQUIRE_THROW (update_limit_order (order_id, {}, bitusd.amount (50 )), fc::assert_exception );
166
- GRAPHENE_REQUIRE_THROW (update_limit_order (order_id, {}, bitusd.amount (-50 )), fc::assert_exception );
167
- GRAPHENE_REQUIRE_THROW (update_limit_order (order_id, {}, munee.amount (50 )), fc::assert_exception );
168
- GRAPHENE_REQUIRE_THROW (update_limit_order (order_id, {}, munee.amount (-50 )), fc::assert_exception );
165
+ GRAPHENE_REQUIRE_THROW (update_limit_order (order_id, {}, bitusd.amount (50 )), fc::exception );
166
+ GRAPHENE_REQUIRE_THROW (update_limit_order (order_id, {}, bitusd.amount (-50 )), fc::exception );
167
+ GRAPHENE_REQUIRE_THROW (update_limit_order (order_id, {}, munee.amount (50 )), fc::exception );
168
+ GRAPHENE_REQUIRE_THROW (update_limit_order (order_id, {}, munee.amount (-50 )), fc::exception );
169
169
170
170
// Cannot update someone else's order
171
171
limit_order_update_operation louop = make_limit_order_update_op ( dan_id, order_id, {}, asset (-1 ) );
172
172
trx.operations .clear ();
173
173
trx.operations .push_back ( louop );
174
- GRAPHENE_REQUIRE_THROW ( PUSH_TX (db, trx, ~0 ), fc::assert_exception );
174
+ GRAPHENE_REQUIRE_THROW ( PUSH_TX (db, trx, ~0 ), fc::exception );
175
175
// Can propose
176
176
propose ( louop );
177
177
178
178
// Cannot update an order which does not exist
179
179
louop = make_limit_order_update_op ( nathan_id, order_id + 1 , {}, asset (-1 ) );
180
180
trx.operations .clear ();
181
181
trx.operations .push_back ( louop );
182
- GRAPHENE_REQUIRE_THROW ( PUSH_TX (db, trx, ~0 ), fc::assert_exception );
182
+ GRAPHENE_REQUIRE_THROW ( PUSH_TX (db, trx, ~0 ), fc::exception );
183
183
184
184
// Try changing price
185
185
sell_price.base = asset (501 );
186
186
// Cannot update base amount in the new price to be more than the amount for sale
187
- GRAPHENE_REQUIRE_THROW ( update_limit_order (order_id, sell_price), fc::assert_exception );
187
+ GRAPHENE_REQUIRE_THROW ( update_limit_order (order_id, sell_price), fc::exception );
188
188
sell_price.base = asset (500 );
189
189
BOOST_REQUIRE_EQUAL (fc::json::to_string (order_id (db).sell_price ), fc::json::to_string (sell_price));
190
190
sell_price.base = asset (499 );
@@ -203,7 +203,7 @@ BOOST_AUTO_TEST_CASE(limit_order_update_test)
203
203
update_limit_order (order_id, {}, {}, expiration);
204
204
BOOST_REQUIRE_EQUAL (order_id (db).expiration .sec_since_epoch (), expiration.sec_since_epoch ());
205
205
// Cannot change expiration to a time in the past
206
- GRAPHENE_REQUIRE_THROW (update_limit_order (order_id, {}, {}, db.head_block_time () - 1 ), fc::assert_exception );
206
+ GRAPHENE_REQUIRE_THROW (update_limit_order (order_id, {}, {}, db.head_block_time () - 1 ), fc::exception );
207
207
208
208
// Try adding funds
209
209
update_limit_order (order_id, {}, asset (50 ));
@@ -283,7 +283,7 @@ BOOST_AUTO_TEST_CASE( limit_order_update_asset_authorization_test )
283
283
PUSH_TX ( db, trx, ~0 );
284
284
285
285
// Cannot update order
286
- GRAPHENE_REQUIRE_THROW ( update_limit_order (order_id, {}, munee.amount (-1 )), fc::assert_exception );
286
+ GRAPHENE_REQUIRE_THROW ( update_limit_order (order_id, {}, munee.amount (-1 )), fc::exception );
287
287
BOOST_REQUIRE_EQUAL (order_id (db).for_sale .value , 49 );
288
288
BOOST_REQUIRE_EQUAL (fc::json::to_string (order_id (db).sell_price ), fc::json::to_string (sell_price));
289
289
BOOST_REQUIRE_EQUAL (order_id (db).expiration .sec_since_epoch (), expiration.sec_since_epoch ());
@@ -328,7 +328,7 @@ BOOST_AUTO_TEST_CASE( limit_order_update_asset_authorization_test )
328
328
PUSH_TX ( db, trx, ~0 );
329
329
330
330
// Cannot update order
331
- GRAPHENE_REQUIRE_THROW ( update_limit_order (order_id, {}, munee.amount (-1 )), fc::assert_exception );
331
+ GRAPHENE_REQUIRE_THROW ( update_limit_order (order_id, {}, munee.amount (-1 )), fc::exception );
332
332
BOOST_REQUIRE_EQUAL (order_id (db).for_sale .value , 48 );
333
333
BOOST_REQUIRE_EQUAL (fc::json::to_string (order_id (db).sell_price ), fc::json::to_string (sell_price));
334
334
BOOST_REQUIRE_EQUAL (order_id (db).expiration .sec_since_epoch (), expiration.sec_since_epoch ());
@@ -359,7 +359,7 @@ BOOST_AUTO_TEST_CASE( limit_order_update_asset_authorization_test )
359
359
PUSH_TX ( db, trx, ~0 );
360
360
361
361
// Cannot update order
362
- GRAPHENE_REQUIRE_THROW ( update_limit_order (order_id, {}, munee.amount (-1 )), fc::assert_exception );
362
+ GRAPHENE_REQUIRE_THROW ( update_limit_order (order_id, {}, munee.amount (-1 )), fc::exception );
363
363
BOOST_REQUIRE_EQUAL (order_id (db).for_sale .value , 47 );
364
364
BOOST_REQUIRE_EQUAL (fc::json::to_string (order_id (db).sell_price ), fc::json::to_string (sell_price));
365
365
BOOST_REQUIRE_EQUAL (order_id (db).expiration .sec_since_epoch (), expiration.sec_since_epoch ());
@@ -391,7 +391,7 @@ BOOST_AUTO_TEST_CASE( limit_order_update_asset_authorization_test )
391
391
PUSH_TX ( db, trx, ~0 );
392
392
393
393
// Cannot update order
394
- GRAPHENE_REQUIRE_THROW ( update_limit_order (order_id, {}, munee.amount (-1 )), fc::assert_exception );
394
+ GRAPHENE_REQUIRE_THROW ( update_limit_order (order_id, {}, munee.amount (-1 )), fc::exception );
395
395
BOOST_REQUIRE_EQUAL (order_id (db).for_sale .value , 46 );
396
396
BOOST_REQUIRE_EQUAL (fc::json::to_string (order_id (db).sell_price ), fc::json::to_string (sell_price));
397
397
BOOST_REQUIRE_EQUAL (order_id (db).expiration .sec_since_epoch (), expiration.sec_since_epoch ());
@@ -429,11 +429,11 @@ BOOST_AUTO_TEST_CASE(limit_order_update_dust_test)
429
429
auto expiration = db.head_block_time () + 1000 ;
430
430
limit_order_id_type order_id = create_sell_order (nathan, asset (1000 ), munee.amount (100 ), expiration)->get_id ();
431
431
432
- GRAPHENE_REQUIRE_THROW (update_limit_order (order_id, {}, asset (-995 )), fc::assert_exception );
432
+ GRAPHENE_REQUIRE_THROW (update_limit_order (order_id, {}, asset (-995 )), fc::exception );
433
433
GRAPHENE_REQUIRE_THROW (update_limit_order (order_id, price (asset (1000000 ), munee.amount (100 ))),
434
- fc::assert_exception );
434
+ fc::exception );
435
435
GRAPHENE_REQUIRE_THROW (update_limit_order (order_id, price (asset (2000 ), munee.amount (100 )), asset (-985 )),
436
- fc::assert_exception );
436
+ fc::exception );
437
437
438
438
generate_block ();
439
439
0 commit comments