1
0
Fork 0
forked from lthn/blockchain

unit_tests: few tests adapted to new address format + lmdb fixed

This commit is contained in:
sowle 2020-05-28 19:38:47 +03:00
parent aeb23bdd81
commit df41672f44
No known key found for this signature in database
GPG key ID: C07A24B2D89D49FC
2 changed files with 4 additions and 3 deletions

View file

@ -439,7 +439,8 @@ namespace
"\xf7\x24\xbc\x5c\x6c\xfb\xb9\xd9\x76\x02\xc3\x00\x42\x3a\x2f\x28"
"\x64\x18\x74\x51\x3a\x03\x57\x78\xa0\xc1\x77\x8d\x83\x32\x01\xe9"
"\x22\x09\x39\x68\x9e\xdf\x1a\xbd\x5b\xc1\xd0\x31\xf7\x3e\xcd\x6c"
"\x99\x3a\xdd\x66\xd6\x80\x88\x70\x45\x6a\xfe\xb8\xe7\xee\xb6\x8d");
"\x99\x3a\xdd\x66\xd6\x80\x88\x70\x45\x6a\xfe\xb8\xe7\xee\xb6\x8d"
"\x00");
std::string test_keys_addr_str = "ZxDqHy6WnyYY5yQcdApjMb8tVPik5BC3LFdaevfbGq7X1KY5vdsWmUi5UQgse2GBZFbMsb47TFqBmPpdFHDDwDxR2ZuZ6zX4W"; // correct str address depends on CURRENCY_PUBLIC_ADDRESS_BASE58_PREFIX value
}
@ -499,7 +500,7 @@ TEST(get_account_address_from_str, fails_on_invalid_address_spend_key)
TEST(get_account_address_from_str, fails_on_invalid_address_view_key)
{
std::string serialized_keys_copy = test_serialized_keys;
serialized_keys_copy.back() = '\x01';
serialized_keys_copy[serialized_keys_copy.size() - 2] = '\x01';
std::string addr_str = base58::encode_addr(CURRENCY_PUBLIC_ADDRESS_BASE58_PREFIX, serialized_keys_copy);
currency::account_public_address addr;

View file

@ -903,7 +903,7 @@ namespace lmdb_test
static const uint64_t buffer_size = 64 * 1024; // 64 KB
static const uint64_t db_total_size = static_cast<uint64_t>(2.1 * 1024 * 1024 * 1024); // 2.1 GB -- a bit more than 2GB to test 2GB boundary
static const std::string db_file_path = std::string("2gb_") + typeid(db_backend_t).name() + "_test";
static const std::string db_file_path = boost::algorithm::replace_all_copy(boost::algorithm::replace_all_copy(std::string("2gb_") + typeid(db_backend_t).name() + "_test", ":", "_"), " ", "_");
std::shared_ptr<db_backend_t> lmdb_ptr = std::make_shared<db_backend_t>();
db::basic_db_accessor bdba(lmdb_ptr, rw_lock);