From 4b2e557181794e55df275c5aff05b6140691ac22 Mon Sep 17 00:00:00 2001 From: Simon Date: Wed, 24 Aug 2016 08:35:04 -0700 Subject: [PATCH] Fix comments. --- src/gtest/test_wallet_zkeys.cpp | 4 ++-- src/test/rpc_wallet_tests.cpp | 16 ++++------------ 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/src/gtest/test_wallet_zkeys.cpp b/src/gtest/test_wallet_zkeys.cpp index 071d89fad..d812c657d 100644 --- a/src/gtest/test_wallet_zkeys.cpp +++ b/src/gtest/test_wallet_zkeys.cpp @@ -19,7 +19,7 @@ TEST(wallet_zkeys_tests, store_and_load_zkeys) { CWallet wallet; - // wallet should by empty + // wallet should be empty std::set addrs; wallet.GetPaymentAddresses(addrs); ASSERT_EQ(0, addrs.size()); @@ -86,7 +86,7 @@ TEST(wallet_zkeys_tests, write_zkey_direct_to_db) { // No default CPubKey set ASSERT_TRUE(fFirstRun); - // wallet should by empty + // wallet should be empty std::set addrs; wallet.GetPaymentAddresses(addrs); ASSERT_EQ(0, addrs.size()); diff --git a/src/test/rpc_wallet_tests.cpp b/src/test/rpc_wallet_tests.cpp index 453855f3f..ada3020b6 100644 --- a/src/test/rpc_wallet_tests.cpp +++ b/src/test/rpc_wallet_tests.cpp @@ -231,7 +231,7 @@ BOOST_AUTO_TEST_CASE(rpc_wallet_z_exportwallet) { LOCK2(cs_main, pwalletMain->cs_wallet); - // wallet should by empty + // wallet should be empty std::set addrs; pwalletMain->GetPaymentAddresses(addrs); BOOST_CHECK(addrs.size()==0); @@ -297,9 +297,6 @@ BOOST_AUTO_TEST_CASE(rpc_wallet_z_importwallet) auto testPaymentAddress = testSpendingKey.address(); std::string testAddr = CZCPaymentAddress(testPaymentAddress).ToString(); std::string testKey = CZCSpendingKey(testSpendingKey).ToString(); - -// std::cout << "testAddr = " << testAddr << std::endl; -// std::cout << "testKey = " << testKey << std::endl; // create test data using the random key std::string format_str = "# Wallet dump created by Zcash v0.11.2.0.z8-9155cc6-dirty (2016-08-11 11:37:00 -0700)\n" @@ -315,8 +312,6 @@ BOOST_AUTO_TEST_CASE(rpc_wallet_z_importwallet) boost::format formatobject(format_str); std::string testWalletDump = (formatobject % testKey % testAddr).str(); - -// std::cout << "testWalletDump =\n" << testWalletDump << std::endl; // write test data to file boost::filesystem::path temp = boost::filesystem::temp_directory_path() / @@ -343,19 +338,16 @@ BOOST_AUTO_TEST_CASE(rpc_wallet_z_importwallet) auto addr = address.Get(); BOOST_CHECK(pwalletMain->HaveSpendingKey(addr)); - // Verify the spending keys is the same as the test data + // Verify the spending key is the same as the test data libzcash::SpendingKey k; BOOST_CHECK(pwalletMain->GetSpendingKey(addr, k)); CZCSpendingKey spendingkey(k); BOOST_CHECK_EQUAL(testKey, spendingkey.ToString()); - -// std::cout << "address = " << address.ToString() << std::endl; -// std::cout << "spendingkey = " << spendingkey.ToString() << std::endl; } /* - * This test covers RPC command z_listaddresses, z_importkey, z_exportkey + * This test covers RPC commands z_listaddresses, z_importkey, z_exportkey */ BOOST_AUTO_TEST_CASE(rpc_wallet_z_importexport) { @@ -412,7 +404,7 @@ BOOST_AUTO_TEST_CASE(rpc_wallet_z_importexport) arr = retValue.get_array(); BOOST_CHECK(arr.size() == numAddrs); - // Create a set form them + // Create a set from them std::unordered_set listaddrs; for (Value element : arr) { listaddrs.insert(element.get_str());