1
0
Fork 0
forked from lthn/blockchain

some tests fixed

This commit is contained in:
sowle 2019-04-18 03:22:19 +03:00
parent 2f2a897bde
commit 2be037042f
2 changed files with 6 additions and 5 deletions

View file

@ -319,6 +319,7 @@ void run_emulation(const std::string& path)
LOG_PRINT_L0("Done");
}
void hash_rate_analysis(const std::string& path);
void run_difficulty_analysis(const std::string& path)
{
@ -335,7 +336,7 @@ void run_difficulty_analysis(const std::string& path)
// std::cout << pow_hash << ENDL;
//crypto::hash mining_hash = currency::get_block_header_mining_hash(b);
crypto::hash id_hash = currency::get_block_hash(b);
//crypto::hash id_hash = currency::get_block_hash(b);

View file

@ -128,11 +128,11 @@ TEST(validate_parse_amount_case, validate_parse_amount)
uint64_t res = 0;
bool r = currency::parse_amount(res, "0.0001");
ASSERT_TRUE(r);
ASSERT_EQ(res, 10000);
ASSERT_EQ(res, 100000000);
r = currency::parse_amount(res, "100.0001");
ASSERT_TRUE(r);
ASSERT_EQ(res, 10000010000);
ASSERT_EQ(res, 100000100000000);
r = currency::parse_amount(res, "000.0000");
ASSERT_TRUE(r);
@ -145,11 +145,11 @@ TEST(validate_parse_amount_case, validate_parse_amount)
r = currency::parse_amount(res, " 100.0001 ");
ASSERT_TRUE(r);
ASSERT_EQ(res, 10000010000);
ASSERT_EQ(res, 100000100000000);
r = currency::parse_amount(res, " 100.0000 ");
ASSERT_TRUE(r);
ASSERT_EQ(res, 10000000000);
ASSERT_EQ(res, 100000000000000);
r = currency::parse_amount(res, " 100. 0000 ");
ASSERT_FALSE(r);