diff --git a/libraries/chain/protocol/account.cpp b/libraries/chain/protocol/account.cpp index a63e6f8033..ac20c79fc6 100644 --- a/libraries/chain/protocol/account.cpp +++ b/libraries/chain/protocol/account.cpp @@ -60,13 +60,6 @@ bool is_valid_name( const string& name ) { try { const size_t len = name.size(); - /** this condition will prevent witnesses from including new names before this time, but - * allow them after this time. This check can be removed from the code after HARDFORK_385_TIME - * has passed. - */ - if( fc::time_point::now() < fc::time_point(HARDFORK_385_TIME) ) - FC_ASSERT( len >= 3 ); - if( len < GRAPHENE_MIN_ACCOUNT_NAME_LENGTH ) { ilog( "."); diff --git a/tests/tests/basic_tests.cpp b/tests/tests/basic_tests.cpp index 2390a7c65f..66755a9114 100644 --- a/tests/tests/basic_tests.cpp +++ b/tests/tests/basic_tests.cpp @@ -51,22 +51,22 @@ BOOST_FIXTURE_TEST_SUITE( basic_tests, database_fixture ) */ BOOST_AUTO_TEST_CASE( valid_name_test ) { - BOOST_CHECK( !is_valid_name( "a" ) ); + BOOST_CHECK( is_valid_name( "a" ) ); BOOST_CHECK( !is_valid_name( "A" ) ); BOOST_CHECK( !is_valid_name( "0" ) ); BOOST_CHECK( !is_valid_name( "." ) ); BOOST_CHECK( !is_valid_name( "-" ) ); - BOOST_CHECK( !is_valid_name( "aa" ) ); + BOOST_CHECK( is_valid_name( "aa" ) ); BOOST_CHECK( !is_valid_name( "aA" ) ); - BOOST_CHECK( !is_valid_name( "a0" ) ); + BOOST_CHECK( is_valid_name( "a0" ) ); BOOST_CHECK( !is_valid_name( "a." ) ); BOOST_CHECK( !is_valid_name( "a-" ) ); BOOST_CHECK( is_valid_name( "aaa" ) ); BOOST_CHECK( !is_valid_name( "aAa" ) ); BOOST_CHECK( is_valid_name( "a0a" ) ); - BOOST_CHECK( !is_valid_name( "a.a" ) ); + BOOST_CHECK( is_valid_name( "a.a" ) ); BOOST_CHECK( is_valid_name( "a-a" ) ); BOOST_CHECK( is_valid_name( "aa0" ) ); @@ -97,9 +97,9 @@ BOOST_AUTO_TEST_CASE( valid_name_test ) BOOST_CHECK( is_valid_name( "aaa.bbb.ccc" ) ); BOOST_CHECK( is_valid_name( "aaa--bbb--ccc" ) ); - BOOST_CHECK( !is_valid_name( "xn--sandmnnchen-p8a.de" ) ); + BOOST_CHECK( is_valid_name( "xn--sandmnnchen-p8a.de" ) ); BOOST_CHECK( is_valid_name( "xn--sandmnnchen-p8a.dex" ) ); - BOOST_CHECK( !is_valid_name( "xn-sandmnnchen-p8a.de" ) ); + BOOST_CHECK( is_valid_name( "xn-sandmnnchen-p8a.de" ) ); BOOST_CHECK( is_valid_name( "xn-sandmnnchen-p8a.dex" ) ); BOOST_CHECK( is_valid_name( "this-label-has-less-than-64-char.acters-63-to-be-really-precise" ) ); diff --git a/tests/tests/uia_tests.cpp b/tests/tests/uia_tests.cpp index d6dc83cb17..4004b20998 100644 --- a/tests/tests/uia_tests.cpp +++ b/tests/tests/uia_tests.cpp @@ -449,6 +449,9 @@ BOOST_AUTO_TEST_CASE( asset_name_test ) GRAPHENE_REQUIRE_THROW( create_user_issued_asset( "ALPHA", alice_id(db), 0 ), fc::exception ); BOOST_CHECK( has_asset("ALPHA") ); BOOST_CHECK( !has_asset("ALPHA.ONE") ); + generate_blocks( HARDFORK_385_TIME ); + generate_block(); + // Bob can't create ALPHA.ONE GRAPHENE_REQUIRE_THROW( create_user_issued_asset( "ALPHA.ONE", bob_id(db), 0 ), fc::exception ); BOOST_CHECK( has_asset("ALPHA") ); BOOST_CHECK( !has_asset("ALPHA.ONE") );