aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/core_proxy/core_proxy.h2
-rw-r--r--tests/core_tests/transaction_tests.cpp4
-rw-r--r--tests/functional_tests/transactions_flow_test.cpp6
-rw-r--r--tests/fuzz/cold-outputs.cpp2
-rw-r--r--tests/fuzz/cold-transaction.cpp2
-rw-r--r--tests/fuzz/signature.cpp4
-rw-r--r--tests/unit_tests/ban.cpp2
-rw-r--r--tests/unit_tests/base58.cpp16
-rw-r--r--tests/unit_tests/multisig.cpp8
-rw-r--r--tests/unit_tests/serialization.cpp28
-rw-r--r--tests/unit_tests/uri.cpp2
11 files changed, 38 insertions, 38 deletions
diff --git a/tests/core_proxy/core_proxy.h b/tests/core_proxy/core_proxy.h
index b7c3dc022..59f8d5239 100644
--- a/tests/core_proxy/core_proxy.h
+++ b/tests/core_proxy/core_proxy.h
@@ -91,7 +91,7 @@ namespace tests
uint64_t get_target_blockchain_height() const { return 1; }
size_t get_block_sync_size(uint64_t height) const { return BLOCKS_SYNCHRONIZING_DEFAULT_COUNT; }
virtual void on_transaction_relayed(const cryptonote::blobdata& tx) {}
- bool get_testnet() const { return false; }
+ cryptonote::network_type get_nettype() const { return cryptonote::MAINNET; }
bool get_pool_transaction(const crypto::hash& id, cryptonote::blobdata& tx_blob) const { return false; }
bool pool_has_tx(const crypto::hash &txid) const { return false; }
bool get_blocks(uint64_t start_offset, size_t count, std::list<std::pair<cryptonote::blobdata, cryptonote::block>>& blocks, std::list<cryptonote::blobdata>& txs) const { return false; }
diff --git a/tests/core_tests/transaction_tests.cpp b/tests/core_tests/transaction_tests.cpp
index 9157c2db4..3c6954bc6 100644
--- a/tests/core_tests/transaction_tests.cpp
+++ b/tests/core_tests/transaction_tests.cpp
@@ -54,7 +54,7 @@ bool test_transaction_generation_and_ring_signature()
account_base miner_acc6;
miner_acc6.generate();
- std::string add_str = miner_acc3.get_public_address_str(false);
+ std::string add_str = miner_acc3.get_public_address_str(MAINNET);
account_base rv_acc;
@@ -140,7 +140,7 @@ bool test_block_creation()
uint64_t vszs[] = {80,476,476,475,475,474,475,474,474,475,472,476,476,475,475,474,475,474,474,475,472,476,476,475,475,474,475,474,474,475,9391,476,476,475,475,474,475,8819,8301,475,472,4302,5316,14347,16620,19583,19403,19728,19442,19852,19015,19000,19016,19795,19749,18087,19787,19704,19750,19267,19006,19050,19445,19407,19522,19546,19788,19369,19486,19329,19370,18853,19600,19110,19320,19746,19474,19474,19743,19494,19755,19715,19769,19620,19368,19839,19532,23424,28287,30707};
std::vector<uint64_t> szs(&vszs[0], &vszs[90]);
address_parse_info info;
- bool r = get_account_address_from_str(info, false, "0099be99c70ef10fd534c43c88e9d13d1c8853213df7e362afbec0e4ee6fec4948d0c190b58f4b356cd7feaf8d9d0a76e7c7e5a9a0a497a6b1faf7a765882dd08ac2");
+ bool r = get_account_address_from_str(info, MAINNET, "0099be99c70ef10fd534c43c88e9d13d1c8853213df7e362afbec0e4ee6fec4948d0c190b58f4b356cd7feaf8d9d0a76e7c7e5a9a0a497a6b1faf7a765882dd08ac2");
CHECK_AND_ASSERT_MES(r, false, "failed to import");
block b;
r = construct_miner_tx(90, epee::misc_utils::median(szs), 3553616528562147, 33094, 10000000, info.address, b.miner_tx, blobdata(), 11);
diff --git a/tests/functional_tests/transactions_flow_test.cpp b/tests/functional_tests/transactions_flow_test.cpp
index 98368c26b..55c18283e 100644
--- a/tests/functional_tests/transactions_flow_test.cpp
+++ b/tests/functional_tests/transactions_flow_test.cpp
@@ -152,8 +152,8 @@ bool transactions_flow_test(std::string& working_folder,
w2.init(daemon_addr_b);
MGINFO_GREEN("Using wallets: " << ENDL
- << "Source: " << w1.get_account().get_public_address_str(false) << ENDL << "Path: " << working_folder + "/" + path_source_wallet << ENDL
- << "Target: " << w2.get_account().get_public_address_str(false) << ENDL << "Path: " << working_folder + "/" + path_target_wallet);
+ << "Source: " << w1.get_account().get_public_address_str(MAINNET) << ENDL << "Path: " << working_folder + "/" + path_source_wallet << ENDL
+ << "Target: " << w2.get_account().get_public_address_str(MAINNET) << ENDL << "Path: " << working_folder + "/" + path_target_wallet);
//lets do some money
epee::net_utils::http::http_simple_client http_client;
@@ -164,7 +164,7 @@ bool transactions_flow_test(std::string& working_folder,
COMMAND_RPC_START_MINING::request daemon_req = AUTO_VAL_INIT(daemon_req);
COMMAND_RPC_START_MINING::response daemon_rsp = AUTO_VAL_INIT(daemon_rsp);
- daemon_req.miner_address = w1.get_account().get_public_address_str(false);
+ daemon_req.miner_address = w1.get_account().get_public_address_str(MAINNET);
daemon_req.threads_count = 9;
r = net_utils::invoke_http_json("/start_mining", daemon_req, daemon_rsp, http_client, std::chrono::seconds(10));
CHECK_AND_ASSERT_MES(r, false, "failed to get getrandom_outs");
diff --git a/tests/fuzz/cold-outputs.cpp b/tests/fuzz/cold-outputs.cpp
index e6f92db27..9aa9460d5 100644
--- a/tests/fuzz/cold-outputs.cpp
+++ b/tests/fuzz/cold-outputs.cpp
@@ -37,7 +37,7 @@
class ColdOutputsFuzzer: public Fuzzer
{
public:
- ColdOutputsFuzzer(): wallet(true) {}
+ ColdOutputsFuzzer(): wallet(cryptonote::TESTNET) {}
virtual int init();
virtual int run(const std::string &filename);
diff --git a/tests/fuzz/cold-transaction.cpp b/tests/fuzz/cold-transaction.cpp
index 5879d6253..d81092c82 100644
--- a/tests/fuzz/cold-transaction.cpp
+++ b/tests/fuzz/cold-transaction.cpp
@@ -37,7 +37,7 @@
class ColdTransactionFuzzer: public Fuzzer
{
public:
- ColdTransactionFuzzer(): wallet(true) {}
+ ColdTransactionFuzzer(): wallet(cryptonote::TESTNET) {}
virtual int init();
virtual int run(const std::string &filename);
diff --git a/tests/fuzz/signature.cpp b/tests/fuzz/signature.cpp
index 69fae84fa..2b8ffe465 100644
--- a/tests/fuzz/signature.cpp
+++ b/tests/fuzz/signature.cpp
@@ -37,7 +37,7 @@
class SignatureFuzzer: public Fuzzer
{
public:
- SignatureFuzzer(): Fuzzer(), wallet(true) {}
+ SignatureFuzzer(): Fuzzer(), wallet(cryptonote::TESTNET) {}
virtual int init();
virtual int run(const std::string &filename);
@@ -58,7 +58,7 @@ int SignatureFuzzer::init()
wallet.generate("", "", spendkey, true, false);
cryptonote::address_parse_info info;
- if (!cryptonote::get_account_address_from_str_or_url(info, true, "9uVsvEryzpN8WH2t1WWhFFCG5tS8cBNdmJYNRuckLENFimfauV5pZKeS1P2CbxGkSDTUPHXWwiYE5ZGSXDAGbaZgDxobqDN"))
+ if (!cryptonote::get_account_address_from_str_or_url(info, cryptonote::TESTNET, "9uVsvEryzpN8WH2t1WWhFFCG5tS8cBNdmJYNRuckLENFimfauV5pZKeS1P2CbxGkSDTUPHXWwiYE5ZGSXDAGbaZgDxobqDN"))
{
std::cerr << "failed to parse address" << std::endl;
return 1;
diff --git a/tests/unit_tests/ban.cpp b/tests/unit_tests/ban.cpp
index 4a3ab0bc3..688656cbc 100644
--- a/tests/unit_tests/ban.cpp
+++ b/tests/unit_tests/ban.cpp
@@ -70,7 +70,7 @@ public:
uint64_t get_target_blockchain_height() const { return 1; }
size_t get_block_sync_size(uint64_t height) const { return BLOCKS_SYNCHRONIZING_DEFAULT_COUNT; }
virtual void on_transaction_relayed(const cryptonote::blobdata& tx) {}
- bool get_testnet() const { return false; }
+ cryptonote::network_type get_nettype() const { return cryptonote::MAINNET; }
bool get_pool_transaction(const crypto::hash& id, cryptonote::blobdata& tx_blob) const { return false; }
bool pool_has_tx(const crypto::hash &txid) const { return false; }
bool get_blocks(uint64_t start_offset, size_t count, std::list<std::pair<cryptonote::blobdata, cryptonote::block>>& blocks, std::list<cryptonote::blobdata>& txs) const { return false; }
diff --git a/tests/unit_tests/base58.cpp b/tests/unit_tests/base58.cpp
index e90fa416d..7edb28e62 100644
--- a/tests/unit_tests/base58.cpp
+++ b/tests/unit_tests/base58.cpp
@@ -474,14 +474,14 @@ TEST(get_account_address_as_str, works_correctly)
{
cryptonote::account_public_address addr;
ASSERT_TRUE(serialization::parse_binary(test_serialized_keys, addr));
- std::string addr_str = cryptonote::get_account_address_as_str(false, false, addr);
+ std::string addr_str = cryptonote::get_account_address_as_str(cryptonote::MAINNET, false, addr);
ASSERT_EQ(addr_str, test_keys_addr_str);
}
TEST(get_account_address_from_str, handles_valid_address)
{
cryptonote::address_parse_info info;
- ASSERT_TRUE(cryptonote::get_account_address_from_str(info, false, test_keys_addr_str));
+ ASSERT_TRUE(cryptonote::get_account_address_from_str(info, cryptonote::MAINNET, test_keys_addr_str));
std::string blob;
ASSERT_TRUE(serialization::dump_binary(info.address, blob));
@@ -494,7 +494,7 @@ TEST(get_account_address_from_str, fails_on_invalid_address_format)
std::string addr_str = test_keys_addr_str;
addr_str[0] = '0';
- ASSERT_FALSE(cryptonote::get_account_address_from_str(info, false, addr_str));
+ ASSERT_FALSE(cryptonote::get_account_address_from_str(info, cryptonote::MAINNET, addr_str));
}
TEST(get_account_address_from_str, fails_on_invalid_address_prefix)
@@ -502,7 +502,7 @@ TEST(get_account_address_from_str, fails_on_invalid_address_prefix)
std::string addr_str = base58::encode_addr(0, test_serialized_keys);
cryptonote::address_parse_info info;
- ASSERT_FALSE(cryptonote::get_account_address_from_str(info, false, addr_str));
+ ASSERT_FALSE(cryptonote::get_account_address_from_str(info, cryptonote::MAINNET, addr_str));
}
TEST(get_account_address_from_str, fails_on_invalid_address_content)
@@ -510,7 +510,7 @@ TEST(get_account_address_from_str, fails_on_invalid_address_content)
std::string addr_str = base58::encode_addr(config::CRYPTONOTE_PUBLIC_ADDRESS_BASE58_PREFIX, test_serialized_keys.substr(1));
cryptonote::address_parse_info info;
- ASSERT_FALSE(cryptonote::get_account_address_from_str(info, false, addr_str));
+ ASSERT_FALSE(cryptonote::get_account_address_from_str(info, cryptonote::MAINNET, addr_str));
}
TEST(get_account_address_from_str, fails_on_invalid_address_spend_key)
@@ -520,7 +520,7 @@ TEST(get_account_address_from_str, fails_on_invalid_address_spend_key)
std::string addr_str = base58::encode_addr(config::CRYPTONOTE_PUBLIC_ADDRESS_BASE58_PREFIX, serialized_keys_copy);
cryptonote::address_parse_info info;
- ASSERT_FALSE(cryptonote::get_account_address_from_str(info, false, addr_str));
+ ASSERT_FALSE(cryptonote::get_account_address_from_str(info, cryptonote::MAINNET, addr_str));
}
TEST(get_account_address_from_str, fails_on_invalid_address_view_key)
@@ -530,11 +530,11 @@ TEST(get_account_address_from_str, fails_on_invalid_address_view_key)
std::string addr_str = base58::encode_addr(config::CRYPTONOTE_PUBLIC_ADDRESS_BASE58_PREFIX, serialized_keys_copy);
cryptonote::address_parse_info info;
- ASSERT_FALSE(cryptonote::get_account_address_from_str(info, false, addr_str));
+ ASSERT_FALSE(cryptonote::get_account_address_from_str(info, cryptonote::MAINNET, addr_str));
}
TEST(get_account_address_from_str, parses_old_address_format)
{
cryptonote::address_parse_info info;
- ASSERT_TRUE(cryptonote::get_account_address_from_str(info, false, "002391bbbb24dea6fd95232e97594a27769d0153d053d2102b789c498f57a2b00b69cd6f2f5c529c1660f2f4a2b50178d6640c20ce71fe26373041af97c5b10236fc"));
+ ASSERT_TRUE(cryptonote::get_account_address_from_str(info, cryptonote::MAINNET, "002391bbbb24dea6fd95232e97594a27769d0153d053d2102b789c498f57a2b00b69cd6f2f5c529c1660f2f4a2b50178d6640c20ce71fe26373041af97c5b10236fc"));
}
diff --git a/tests/unit_tests/multisig.cpp b/tests/unit_tests/multisig.cpp
index f70bb91a3..922299333 100644
--- a/tests/unit_tests/multisig.cpp
+++ b/tests/unit_tests/multisig.cpp
@@ -64,7 +64,7 @@ static void make_wallet(unsigned int idx, tools::wallet2 &wallet)
wallet.init("");
wallet.set_subaddress_lookahead(1, 1);
wallet.generate("", "", spendkey, true, false);
- ASSERT_TRUE(test_addresses[idx].address == wallet.get_account().get_public_address_str(true));
+ ASSERT_TRUE(test_addresses[idx].address == wallet.get_account().get_public_address_str(cryptonote::TESTNET));
}
catch (const std::exception &e)
{
@@ -93,7 +93,7 @@ static void make_M_2_wallet(tools::wallet2 &wallet0, tools::wallet2 &wallet1, un
wallet0.make_multisig("", sk0, pk0, M);
wallet1.make_multisig("", sk1, pk1, M);
- ASSERT_TRUE(wallet0.get_account().get_public_address_str(true) == wallet1.get_account().get_public_address_str(true));
+ ASSERT_TRUE(wallet0.get_account().get_public_address_str(cryptonote::TESTNET) == wallet1.get_account().get_public_address_str(cryptonote::TESTNET));
bool ready;
uint32_t threshold, total;
@@ -150,8 +150,8 @@ static void make_M_3_wallet(tools::wallet2 &wallet0, tools::wallet2 &wallet1, to
ASSERT_TRUE(wallet2.finalize_multisig("", pkeys, signers));
}
- ASSERT_TRUE(wallet0.get_account().get_public_address_str(true) == wallet1.get_account().get_public_address_str(true));
- ASSERT_TRUE(wallet0.get_account().get_public_address_str(true) == wallet2.get_account().get_public_address_str(true));
+ ASSERT_TRUE(wallet0.get_account().get_public_address_str(cryptonote::TESTNET) == wallet1.get_account().get_public_address_str(cryptonote::TESTNET));
+ ASSERT_TRUE(wallet0.get_account().get_public_address_str(cryptonote::TESTNET) == wallet2.get_account().get_public_address_str(cryptonote::TESTNET));
bool ready;
uint32_t threshold, total;
diff --git a/tests/unit_tests/serialization.cpp b/tests/unit_tests/serialization.cpp
index 00bb9e49c..5a2114027 100644
--- a/tests/unit_tests/serialization.cpp
+++ b/tests/unit_tests/serialization.cpp
@@ -670,9 +670,9 @@ TEST(Serialization, serializes_ringct_types)
TEST(Serialization, portability_wallet)
{
- const bool testnet = true;
+ const cryptonote::network_type nettype = cryptonote::TESTNET;
const bool restricted = false;
- tools::wallet2 w(testnet, restricted);
+ tools::wallet2 w(nettype, restricted);
const boost::filesystem::path wallet_file = unit_test::data_dir / "wallet_9svHk1";
string password = "test";
bool r = false;
@@ -914,7 +914,7 @@ TEST(Serialization, portability_unsigned_tx)
{
const boost::filesystem::path filename = unit_test::data_dir / "unsigned_monero_tx";
std::string s;
- const bool testnet = true;
+ const cryptonote::network_type nettype = cryptonote::TESTNET;
bool r = epee::file_io_utils::load_file_to_string(filename.string(), s);
ASSERT_TRUE(r);
const size_t magiclen = strlen(UNSIGNED_TX_PREFIX);
@@ -992,15 +992,15 @@ TEST(Serialization, portability_unsigned_tx)
ASSERT_TRUE(epee::string_tools::pod_to_hex(tse.mask) == "789bafff169ef206aa21219342c69ca52ce1d78d776c10b21d14bdd960fc7703");
// tcd.change_dts
ASSERT_TRUE(tcd.change_dts.amount == 9631208773403);
- ASSERT_TRUE(cryptonote::get_account_address_as_str(testnet, false, tcd.change_dts.addr) == "9svHk1wHPo3ULf2AZykghzcye6sitaRE4MaDjPC6uanTHCynHjJHZaiAb922PojE1GexhhRt1LVf5DC43feyrRZMLXQr3mk");
+ ASSERT_TRUE(cryptonote::get_account_address_as_str(nettype, false, tcd.change_dts.addr) == "9svHk1wHPo3ULf2AZykghzcye6sitaRE4MaDjPC6uanTHCynHjJHZaiAb922PojE1GexhhRt1LVf5DC43feyrRZMLXQr3mk");
// tcd.splitted_dsts
ASSERT_TRUE(tcd.splitted_dsts.size() == 2);
auto& splitted_dst0 = tcd.splitted_dsts[0];
auto& splitted_dst1 = tcd.splitted_dsts[1];
ASSERT_TRUE(splitted_dst0.amount == 1400000000000);
ASSERT_TRUE(splitted_dst1.amount == 9631208773403);
- ASSERT_TRUE(cryptonote::get_account_address_as_str(testnet, false, splitted_dst0.addr) == "9xnhrMczQkPeoGi6dyu6BgKAYX4tZsDs6KHCkyTStDBKL4M4pM1gfCR3utmTAcSaKHGa1R5o266FbdnubErmij3oMdLyYgA");
- ASSERT_TRUE(cryptonote::get_account_address_as_str(testnet, false, splitted_dst1.addr) == "9svHk1wHPo3ULf2AZykghzcye6sitaRE4MaDjPC6uanTHCynHjJHZaiAb922PojE1GexhhRt1LVf5DC43feyrRZMLXQr3mk");
+ ASSERT_TRUE(cryptonote::get_account_address_as_str(nettype, false, splitted_dst0.addr) == "9xnhrMczQkPeoGi6dyu6BgKAYX4tZsDs6KHCkyTStDBKL4M4pM1gfCR3utmTAcSaKHGa1R5o266FbdnubErmij3oMdLyYgA");
+ ASSERT_TRUE(cryptonote::get_account_address_as_str(nettype, false, splitted_dst1.addr) == "9svHk1wHPo3ULf2AZykghzcye6sitaRE4MaDjPC6uanTHCynHjJHZaiAb922PojE1GexhhRt1LVf5DC43feyrRZMLXQr3mk");
// tcd.selected_transfers
ASSERT_TRUE(tcd.selected_transfers.size() == 1);
ASSERT_TRUE(tcd.selected_transfers.front() == 2);
@@ -1013,7 +1013,7 @@ TEST(Serialization, portability_unsigned_tx)
ASSERT_TRUE(tcd.dests.size() == 1);
auto& dest = tcd.dests[0];
ASSERT_TRUE(dest.amount == 1400000000000);
- ASSERT_TRUE(cryptonote::get_account_address_as_str(testnet, false, dest.addr) == "9xnhrMczQkPeoGi6dyu6BgKAYX4tZsDs6KHCkyTStDBKL4M4pM1gfCR3utmTAcSaKHGa1R5o266FbdnubErmij3oMdLyYgA");
+ ASSERT_TRUE(cryptonote::get_account_address_as_str(nettype, false, dest.addr) == "9xnhrMczQkPeoGi6dyu6BgKAYX4tZsDs6KHCkyTStDBKL4M4pM1gfCR3utmTAcSaKHGa1R5o266FbdnubErmij3oMdLyYgA");
// transfers
ASSERT_TRUE(exported_txs.transfers.size() == 3);
auto& td0 = exported_txs.transfers[0];
@@ -1061,7 +1061,7 @@ TEST(Serialization, portability_unsigned_tx)
TEST(Serialization, portability_signed_tx)
{
const boost::filesystem::path filename = unit_test::data_dir / "signed_monero_tx";
- const bool testnet = true;
+ const cryptonote::network_type nettype = cryptonote::TESTNET;
std::string s;
bool r = epee::file_io_utils::load_file_to_string(filename.string(), s);
ASSERT_TRUE(r);
@@ -1106,7 +1106,7 @@ TEST(Serialization, portability_signed_tx)
ASSERT_FALSE(ptx.dust_added_to_fee);
// ptx.change.{amount, addr}
ASSERT_TRUE(ptx.change_dts.amount == 9631208773403);
- ASSERT_TRUE(cryptonote::get_account_address_as_str(testnet, false, ptx.change_dts.addr) == "9svHk1wHPo3ULf2AZykghzcye6sitaRE4MaDjPC6uanTHCynHjJHZaiAb922PojE1GexhhRt1LVf5DC43feyrRZMLXQr3mk");
+ ASSERT_TRUE(cryptonote::get_account_address_as_str(nettype, false, ptx.change_dts.addr) == "9svHk1wHPo3ULf2AZykghzcye6sitaRE4MaDjPC6uanTHCynHjJHZaiAb922PojE1GexhhRt1LVf5DC43feyrRZMLXQr3mk");
// ptx.selected_transfers
ASSERT_TRUE(ptx.selected_transfers.size() == 1);
ASSERT_TRUE(ptx.selected_transfers.front() == 2);
@@ -1116,7 +1116,7 @@ TEST(Serialization, portability_signed_tx)
// ptx.dests
ASSERT_TRUE(ptx.dests.size() == 1);
ASSERT_TRUE(ptx.dests[0].amount == 1400000000000);
- ASSERT_TRUE(cryptonote::get_account_address_as_str(testnet, false, ptx.dests[0].addr) == "9xnhrMczQkPeoGi6dyu6BgKAYX4tZsDs6KHCkyTStDBKL4M4pM1gfCR3utmTAcSaKHGa1R5o266FbdnubErmij3oMdLyYgA");
+ ASSERT_TRUE(cryptonote::get_account_address_as_str(nettype, false, ptx.dests[0].addr) == "9xnhrMczQkPeoGi6dyu6BgKAYX4tZsDs6KHCkyTStDBKL4M4pM1gfCR3utmTAcSaKHGa1R5o266FbdnubErmij3oMdLyYgA");
// ptx.construction_data
auto& tcd = ptx.construction_data;
ASSERT_TRUE(tcd.sources.size() == 1);
@@ -1147,15 +1147,15 @@ TEST(Serialization, portability_signed_tx)
ASSERT_TRUE(epee::string_tools::pod_to_hex(tse.mask) == "789bafff169ef206aa21219342c69ca52ce1d78d776c10b21d14bdd960fc7703");
// ptx.construction_data.change_dts
ASSERT_TRUE(tcd.change_dts.amount == 9631208773403);
- ASSERT_TRUE(cryptonote::get_account_address_as_str(testnet, false, tcd.change_dts.addr) == "9svHk1wHPo3ULf2AZykghzcye6sitaRE4MaDjPC6uanTHCynHjJHZaiAb922PojE1GexhhRt1LVf5DC43feyrRZMLXQr3mk");
+ ASSERT_TRUE(cryptonote::get_account_address_as_str(nettype, false, tcd.change_dts.addr) == "9svHk1wHPo3ULf2AZykghzcye6sitaRE4MaDjPC6uanTHCynHjJHZaiAb922PojE1GexhhRt1LVf5DC43feyrRZMLXQr3mk");
// ptx.construction_data.splitted_dsts
ASSERT_TRUE(tcd.splitted_dsts.size() == 2);
auto& splitted_dst0 = tcd.splitted_dsts[0];
auto& splitted_dst1 = tcd.splitted_dsts[1];
ASSERT_TRUE(splitted_dst0.amount == 1400000000000);
ASSERT_TRUE(splitted_dst1.amount == 9631208773403);
- ASSERT_TRUE(cryptonote::get_account_address_as_str(testnet, false, splitted_dst0.addr) == "9xnhrMczQkPeoGi6dyu6BgKAYX4tZsDs6KHCkyTStDBKL4M4pM1gfCR3utmTAcSaKHGa1R5o266FbdnubErmij3oMdLyYgA");
- ASSERT_TRUE(cryptonote::get_account_address_as_str(testnet, false, splitted_dst1.addr) == "9svHk1wHPo3ULf2AZykghzcye6sitaRE4MaDjPC6uanTHCynHjJHZaiAb922PojE1GexhhRt1LVf5DC43feyrRZMLXQr3mk");
+ ASSERT_TRUE(cryptonote::get_account_address_as_str(nettype, false, splitted_dst0.addr) == "9xnhrMczQkPeoGi6dyu6BgKAYX4tZsDs6KHCkyTStDBKL4M4pM1gfCR3utmTAcSaKHGa1R5o266FbdnubErmij3oMdLyYgA");
+ ASSERT_TRUE(cryptonote::get_account_address_as_str(nettype, false, splitted_dst1.addr) == "9svHk1wHPo3ULf2AZykghzcye6sitaRE4MaDjPC6uanTHCynHjJHZaiAb922PojE1GexhhRt1LVf5DC43feyrRZMLXQr3mk");
// ptx.construction_data.selected_transfers
ASSERT_TRUE(tcd.selected_transfers.size() == 1);
ASSERT_TRUE(tcd.selected_transfers.front() == 2);
@@ -1168,7 +1168,7 @@ TEST(Serialization, portability_signed_tx)
ASSERT_TRUE(tcd.dests.size() == 1);
auto& dest = tcd.dests[0];
ASSERT_TRUE(dest.amount == 1400000000000);
- ASSERT_TRUE(cryptonote::get_account_address_as_str(testnet, false, dest.addr) == "9xnhrMczQkPeoGi6dyu6BgKAYX4tZsDs6KHCkyTStDBKL4M4pM1gfCR3utmTAcSaKHGa1R5o266FbdnubErmij3oMdLyYgA");
+ ASSERT_TRUE(cryptonote::get_account_address_as_str(nettype, false, dest.addr) == "9xnhrMczQkPeoGi6dyu6BgKAYX4tZsDs6KHCkyTStDBKL4M4pM1gfCR3utmTAcSaKHGa1R5o266FbdnubErmij3oMdLyYgA");
// key_images
ASSERT_TRUE(exported_txs.key_images.size() == 3);
auto& ki0 = exported_txs.key_images[0];
diff --git a/tests/unit_tests/uri.cpp b/tests/unit_tests/uri.cpp
index 1026cc85b..999c117c2 100644
--- a/tests/unit_tests/uri.cpp
+++ b/tests/unit_tests/uri.cpp
@@ -37,7 +37,7 @@
std::string address, payment_id, recipient_name, description, error; \
uint64_t amount; \
std::vector<std::string> unknown_parameters; \
- tools::wallet2 w(true); \
+ tools::wallet2 w(cryptonote::TESTNET); \
bool ret = w.parse_uri(uri, address, payment_id, amount, description, recipient_name, unknown_parameters, error); \
ASSERT_EQ(ret, expected);