HARDFORK - Enforce asset domains
This commit is contained in:
parent
487046e375
commit
fc48ecbfc1
1 changed files with 11 additions and 0 deletions
|
|
@ -100,6 +100,17 @@ void_result asset_create_evaluator::do_evaluate( const asset_create_operation& o
|
|||
auto asset_symbol_itr = asset_indx.find( op.symbol );
|
||||
FC_ASSERT( asset_symbol_itr == asset_indx.end() );
|
||||
|
||||
auto dotpos = op.symbol.find( '.' );
|
||||
if( dotpos != std::string::npos ) {
|
||||
auto prefix = op.symbol.substr( 0, dotpos );
|
||||
auto asset_symbol_itr = asset_indx.find( op.symbol );
|
||||
FC_ASSERT( asset_symbol_itr != asset_indx.end(), "Asset ${s} may only be created by issuer of ${p}, but ${p} has not been registered",
|
||||
("s",op.symbol)("p",prefix) );
|
||||
FC_ASSERT( asset_symbol_itr->issuer == op.issuer, "Asset ${s} may only be created by issuer of ${p}, ${i}",
|
||||
("s",op.symbol)("p",prefix)("i", op.issuer(d).name) );
|
||||
}
|
||||
|
||||
|
||||
core_fee_paid -= core_fee_paid.value/2;
|
||||
|
||||
if( op.bitasset_opts )
|
||||
|
|
|
|||
Loading…
Reference in a new issue