GolosChain / golos

Socio-economic mediablockchain
https://developers.golos.io
Other
59 stars 36 forks source link

HF0.2 UIA, impossible to create a UIA with a dot in name #316

Closed gropox closed 6 years ago

gropox commented 6 years ago

It is impossible to create a UIA with a dot in name.

unlocked >>> get_asset CYBERFOUNDER
{
  "id": 4,
  "asset_name": "CYBERFOUNDER",
  "precision": 1,
  "issuer": "cyberfounder",
  "options": {
    "max_supply": 100000000,
    "market_fee_percent": 0,
    "max_market_fee": 0,
    "issuer_permissions": 79,
    "flags": 0,
    "core_exchange_rate": {
      "base": "1.000 GOLOS",
      "quote": "1.000 CYBERFOUNDER"
    },
    "whitelist_authorities": [],
    "blacklist_authorities": [],
    "whitelist_markets": [],
    "blacklist_markets": [],
    "description": "Business Asset",
    "extensions": []
  },
  "market_issued": false
}

create_asset cyberfounder CYBERFOUNDER.DOT 1 {"description": "Business Asset", "max_supply": 100000000, "max_market_fee": 0, "core_exchange_rate":{"base":"1.000 GOLOS","quote":"1.000 CYBERFOUNDER.DOT"}} null true
0 exception: unspecified
10 basic_exception: tion
asset_symbol_sub_itr != asset_indx.end(): Asset CYBERFOUNDER.DOT may only be created by issuer of CYBERFOUNDER, but CYBERFOUNDER has not been registered
    {"s":"CYBERFOUNDER.DOT","p":"CYBERFOUNDER"}
    th_a  asset_evaluator.cpp:43 do_apply

    {"op":{"issuer":"cyberfounder","asset_name":"CYBERFOUNDER.DOT","precision":1,"common_options":{"max_supply":100000000,"market_fee_percent":0,"max_market_fee":0,"issuer_permissions":79,"flags":0,"core_exchange_rate":{"base":"1.000 GOLOS","quote":"1.000 CYBERFOUNDER.DOT"},"whitelist_authorities":[],"blacklist_authorities":[],"whitelist_markets":[],"blacklist_markets":[],"description":"Business Asset","extensions":[]},"is_prediction_market":false,"extensions":[]}}
    th_a  asset_evaluator.cpp:73 do_apply

Strange, but GUI shows a different error message, despite asset = prefix does not exist

image

nemothenoone commented 6 years ago

@gropox Fixed with 31a59bbf69.

gropox commented 6 years ago

compilation error

/usr/include/boost/interprocess/offset_ptr.hpp:516:16: note:   no known conversion for argument 1 from ‘std::__cxx11::basic_string<char>’ to ‘const boost::interprocess::offset_ptr<void>&’
In file included from /usr/local/src/golos/libraries/chain/include/golos/chain/steem_object_types.hpp:8:0,
                 from /usr/local/src/golos/libraries/chain/include/golos/chain/objects/asset_object.hpp:3,
                 from /usr/local/src/golos/libraries/chain/include/golos/chain/evaluators/asset_evaluator.hpp:3,
                 from /usr/local/src/golos/libraries/chain/evaluators/asset_evaluator.cpp:1:
/usr/local/src/golos/libraries/chainbase/include/chainbase/chainbase.hpp:1132:27: error: ‘const ObjectType& chainbase::database::create(Constructor&&) [with ObjectType = golos::chain::asset_dynamic_data_object; Constructor = golos::chain::asset_create_evaluator<Major, Hardfork, Release>::do_apply(const operation_type&) [with unsigned char Major = 0u; unsigned char Hardfork = 17u; short unsigned int Release = 0u; golos::chain::asset_create_evaluator<Major, Hardfork, Release>::operation_type = golos::protocol::asset_create_operation<0u, 17u, 0u>]::<lambda(golos::chain::asset_dynamic_data_object&)>]’, declared using local type ‘golos::chain::asset_create_evaluator<Major, Hardfork, Release>::do_apply(const operation_type&) [with unsigned char Major = 0u; unsigned char Hardfork = 17u; short unsigned int Release = 0u; golos::chain::asset_create_evaluator<Major, Hardfork, Release>::operation_type = golos::protocol::asset_create_operation<0u, 17u, 0u>]::<lambda(golos::chain::asset_dynamic_data_object&)>’, is used but never defined [-fpermissive]
         const ObjectType &create(Constructor &&con) {
                           ^
/usr/local/src/golos/libraries/chainbase/include/chainbase/chainbase.hpp:1132:27: error: ‘const ObjectType& chainbase::database::create(Constructor&&) [with ObjectType = golos::chain::asset_bitasset_data_object; Constructor = golos::chain::asset_create_evaluator<Major, Hardfork, Release>::do_apply(const operation_type&) [with unsigned char Major = 0u; unsigned char Hardfork = 17u; short unsigned int Release = 0u; golos::chain::asset_create_evaluator<Major, Hardfork, Release>::operation_type = golos::protocol::asset_create_operation<0u, 17u, 0u>]::<lambda(golos::chain::asset_bitasset_data_object&)>]’, declared using local type ‘golos::chain::asset_create_evaluator<Major, Hardfork, Release>::do_apply(const operation_type&) [with unsigned char Major = 0u; unsigned char Hardfork = 17u; short unsigned int Release = 0u; golos::chain::asset_create_evaluator<Major, Hardfork, Release>::operation_type = golos::protocol::asset_create_operation<0u, 17u, 0u>]::<lambda(golos::chain::asset_bitasset_data_object&)>’, is used but never defined [-fpermissive]
/usr/local/src/golos/libraries/chainbase/include/chainbase/chainbase.hpp:1132:27: error: ‘const ObjectType& chainbase::database::create(Constructor&&) [with ObjectType = golos::chain::asset_object; Constructor = golos::chain::asset_create_evaluator<Major, Hardfork, Release>::do_apply(const operation_type&) [with unsigned char Major = 0u; unsigned char Hardfork = 17u; short unsigned int Release = 0u; golos::chain::asset_create_evaluator<Major, Hardfork, Release>::operation_type = golos::protocol::asset_create_operation<0u, 17u, 0u>]::<lambda(golos::chain::asset_object&)>]’, declared using local type ‘golos::chain::asset_create_evaluator<Major, Hardfork, Release>::do_apply(const operation_type&) [with unsigned char Major = 0u; unsigned char Hardfork = 17u; short unsigned int Release = 0u; golos::chain::asset_create_evaluator<Major, Hardfork, Release>::operation_type = golos::protocol::asset_create_operation<0u, 17u, 0u>]::<lambda(golos::chain::asset_object&)>’, is used but never defined [-fpermissive]
cc1plus: warning: unrecognized command line option ‘-Wno-unused-local-typedef’
make[2]: *** [libraries/chain/CMakeFiles/golos_chain.dir/evaluators/asset_evaluator.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
nemothenoone commented 6 years ago

@gropox Oops. My fault. Fixed the typo with 11a046081d