From c3b30b3dd7c1273d2f4b017b166b310591925e24 Mon Sep 17 00:00:00 2001 From: Nathan Hourt Date: Fri, 19 Jun 2015 16:36:37 -0400 Subject: [PATCH] Tweak to database_fixture::borrow --- tests/common/database_fixture.cpp | 1 - tests/common/database_fixture.hpp | 14 ++++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/tests/common/database_fixture.cpp b/tests/common/database_fixture.cpp index e4912fa0..96b50c9c 100644 --- a/tests/common/database_fixture.cpp +++ b/tests/common/database_fixture.cpp @@ -718,7 +718,6 @@ void database_fixture::force_settle( const account_object& who, asset what ) void database_fixture::borrow( const account_object& who, asset what, asset collateral, price call_price ) { try { - asset call_price_collateral((collateral.amount.value * 3)/4, collateral.asset_id ); trx.set_expiration(db.head_block_time() + fc::minutes(1)); trx.operations.clear(); trx.operations.push_back( call_order_update_operation({ asset(), who.id, collateral, what, call_price }));; diff --git a/tests/common/database_fixture.hpp b/tests/common/database_fixture.hpp index 9f308fec..edbead03 100644 --- a/tests/common/database_fixture.hpp +++ b/tests/common/database_fixture.hpp @@ -147,12 +147,14 @@ struct database_fixture { key_id_type key = key_id_type() ); - void force_global_settle( const asset_object& what, const price& p ); - void force_settle( const account_object& who, asset what ); - void update_feed_producers( const asset_object& mia, flat_set producers ); - void publish_feed( const asset_object& mia, const account_object& by, const price_feed& f ); - void borrow( const account_object& who, asset what, asset collateral, price call_price = price()); - void cover( const account_object& who, asset what, asset collateral_freed, price call_price = price()); + void force_global_settle(const asset_object& what, const price& p); + void force_settle(const account_object& who, asset what); + void update_feed_producers(const asset_object& mia, flat_set producers); + void publish_feed(const asset_object& mia, const account_object& by, const price_feed& f); + void borrow(account_id_type who, asset what, asset collateral, price call_price = price()) + { borrow(who(db), what, collateral, call_price); } + void borrow(const account_object& who, asset what, asset collateral, price call_price); + void cover(const account_object& who, asset what, asset collateral_freed, price call_price = price()); const asset_object& get_asset( const string& symbol )const; const account_object& get_account( const string& name )const;