1
0
Fork 0
forked from lthn/blockchain

bcs: fixed put_asset_info() to enable verification of the asset emit operation

This commit is contained in:
sowle 2023-08-19 15:47:11 +02:00
parent 0677548653
commit 8f4d822e5e
No known key found for this signature in database
GPG key ID: C07A24B2D89D49FC

View file

@ -3851,10 +3851,13 @@ bool blockchain_storage::put_asset_info(const transaction& tx, const crypto::has
LOG_PRINT_MAGENTA("[ASSET_REGISTERED]: " << avc.asset_id << ": " << ado.descriptor.full_name, LOG_LEVEL_1);
//TODO:
//rise_core_event(CORE_EVENT_ADD_ASSET, alias_info_to_rpc_alias_info(ai));
}else
}
else
{
CHECK_AND_ASSERT_MES(avc.ado.opt_asset_id, false, "asset_id not provided for asset altering operation");
avc.asset_op_history = m_db_assets.find(*avc.ado.opt_asset_id);
avc.asset_id = *avc.ado.opt_asset_id; // consider redisign
avc.asset_id_pt.from_public_key(avc.asset_id);
CHECK_AND_ASSERT_MES(avc.asset_op_history && avc.asset_op_history->size(), false, "asset with id " << avc.asset_id << " has not been registered");
// check ownership permission