Skip to content

Commit

Permalink
Account name market shall be skipped for accounts created by gateway E…
Browse files Browse the repository at this point in the history
  • Loading branch information
Mariusz-Trela committed Nov 7, 2018
1 parent dc4eda7 commit b89c9c0
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion contracts/eosio.system/eosio.system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ namespace eosiosystem {
const authority& owner,
const authority& active*/ ) {

if( creator != _self ) {
if( creator != N(beos.gateway) && creator != _self ) {
auto tmp = newact >> 4;
bool has_dot = false;

Expand Down
18 changes: 18 additions & 0 deletions unittests/eosio.interchain_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1665,4 +1665,22 @@ BOOST_FIXTURE_TEST_CASE( main_commands_test_4, eosio_interchain_tester ) try {
CHECK_STATS(dan, "0.0000 PROXY", "133.3333 BEOS", "833333");

} FC_LOG_AND_RETHROW()

BOOST_FIXTURE_TEST_CASE( creating_short_names, eosio_interchain_tester ) try {
BOOST_TEST_MESSAGE( "Creating names with length less than 12 chars - creator beos.gateway");

BOOST_REQUIRE_EQUAL( success(), initresource( config::gateway_account_name,
100'000'000,
asset::from_string("1000.0000 BEOS"),
asset::from_string("1000.0000 BEOS")
)
);

create_account_with_resources( config::gateway_account_name, N(mario) );
create_account_with_resources( config::gateway_account_name, N(mario.mar) );
create_account_with_resources( config::gateway_account_name, N(12345123451) );
create_account_with_resources( config::gateway_account_name, N(1234.x) );

} FC_LOG_AND_RETHROW()

BOOST_AUTO_TEST_SUITE_END()

0 comments on commit b89c9c0

Please sign in to comment.