Tweak to database_fixture::borrow

This commit is contained in:
Nathan Hourt 2015-06-19 16:36:37 -04:00
parent c1d1884d0b
commit c3b30b3dd7
2 changed files with 8 additions and 7 deletions

View file

@ -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 }));;

View file

@ -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<account_id_type> 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<account_id_type> 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;