Added test for #433
This commit is contained in:
parent
bee7f31f07
commit
bb813a96b0
1 changed files with 40 additions and 0 deletions
|
|
@ -997,4 +997,44 @@ BOOST_AUTO_TEST_CASE( issue_429_test )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BOOST_AUTO_TEST_CASE( issue_433_test )
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
ACTORS((alice));
|
||||||
|
|
||||||
|
auto& core = asset_id_type()(db);
|
||||||
|
|
||||||
|
transfer( committee_account, alice_id, asset( 1000000 * asset::scaled_precision( core.precision ) ) );
|
||||||
|
|
||||||
|
const auto& myusd = create_user_issued_asset( "MYUSD", alice, 0 );
|
||||||
|
issue_uia( alice, myusd.amount( 1000000000 ) );
|
||||||
|
|
||||||
|
// make sure the database requires our fee to be nonzero
|
||||||
|
enable_fees();
|
||||||
|
|
||||||
|
auto fees_to_pay = db.get_global_properties().parameters.current_fees->get<asset_create_operation>();
|
||||||
|
|
||||||
|
fund_fee_pool( alice, myusd, 2*fees_to_pay.long_symbol );
|
||||||
|
|
||||||
|
signed_transaction tx;
|
||||||
|
asset_create_operation op;
|
||||||
|
op.issuer = alice_id;
|
||||||
|
op.symbol = "ALICE";
|
||||||
|
op.common_options.core_exchange_rate = asset( 1 ) / asset( 1, asset_id_type( 1 ) );
|
||||||
|
op.fee = myusd.amount( ((fees_to_pay.long_symbol + fees_to_pay.price_per_kbyte) & (~1)) );
|
||||||
|
tx.operations.push_back( op );
|
||||||
|
set_expiration( db, tx );
|
||||||
|
sign( tx, alice_private_key );
|
||||||
|
PUSH_TX( db, tx );
|
||||||
|
|
||||||
|
verify_asset_supplies( db );
|
||||||
|
}
|
||||||
|
catch( const fc::exception& e )
|
||||||
|
{
|
||||||
|
edump((e.to_detail_string()));
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
BOOST_AUTO_TEST_SUITE_END()
|
BOOST_AUTO_TEST_SUITE_END()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue