From c1998124e13e44064f9832f526e260e2ff738b86 Mon Sep 17 00:00:00 2001 From: moneroexamples Date: Sat, 4 May 2019 16:30:22 +0800 Subject: [PATCH] code cleanup --- src/Account.cpp | 23 ----------------------- src/Account.h | 4 ++-- 2 files changed, 2 insertions(+), 25 deletions(-) diff --git a/src/Account.cpp b/src/Account.cpp index 786a666..feb802f 100644 --- a/src/Account.cpp +++ b/src/Account.cpp @@ -101,29 +101,6 @@ PrimaryAccount::add_subaddress_index(uint32_t acc_id, uint32_t addr_id) return it.first; } -//void -//PrimaryAccount::populate_subaddress_indices(uint32_t last_acc_id) -//{ - //auto& device = hw::get_device("default"); - - //auto account_keys = *(this->keys()); - - //for (uint32_t acc_id {0}; acc_id < last_acc_id; ++acc_id) - //{ - ////auto public_keys = device.get_subaddress_spend_public_keys( - ////account_keys, acc_id, 0, 200); - //for (uint32_t addr_id {0}; addr_id < 200; ++addr_id) - //{ - //subaddress_index idx {acc_id, addr_id}; - - //auto pub_spendkey = device.get_subaddress_spend_public_key( - //account_keys, idx); - - //subaddresses[pub_spendkey] = idx; - //} - //} -//} - void PrimaryAccount::populate_subaddress_indices(uint32_t last_acc_id) { diff --git a/src/Account.h b/src/Account.h index 784c7d6..a44fef2 100644 --- a/src/Account.h +++ b/src/Account.h @@ -155,7 +155,6 @@ public: {return NONE;} }; - class SubaddressAccount : public Account { public: @@ -166,6 +165,7 @@ public: {return SUBADDRESS;} }; + class PrimaryAccount : public Account { public: @@ -231,7 +231,7 @@ public: auto end() { return subaddresses.end(); } auto end() const { return subaddresses.cend(); } -protected: +private: subaddr_map_t subaddresses; };