HARDFORK enable whitelisting of everyone, but blacklisting of some

This commit is contained in:
Daniel Larimer 2015-10-28 11:51:38 -04:00 committed by theoreticalbts
parent a1b00b2749
commit d1f9216f85

View file

@ -38,12 +38,23 @@ share_type cut_fee(share_type a, uint16_t p)
return r.to_uint64();
}
bool account_object::is_authorized_asset(const asset_object& asset_obj) const {
bool account_object::is_authorized_asset(const asset_object& asset_obj) const
{
for( const auto id : blacklisting_accounts )
if( asset_obj.options.blacklist_authorities.find(id) != asset_obj.options.blacklist_authorities.end() ) return false;
{
if( asset_obj.options.blacklist_authorities.find(id) != asset_obj.options.blacklist_authorities.end() )
return false;
}
if( asset_obj.options.whitelist_authorities.size() == 0 )
return true;
for( const auto id : whitelisting_accounts )
if( asset_obj.options.whitelist_authorities.find(id) != asset_obj.options.whitelist_authorities.end() ) return true;
{
if( asset_obj.options.whitelist_authorities.find(id) != asset_obj.options.whitelist_authorities.end() )
return true;
}
return false;
}