diff options
Diffstat (limited to 'src/wallet/wallet2.cpp')
-rw-r--r-- | src/wallet/wallet2.cpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 81472687d..3dafa56f0 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -1561,6 +1561,23 @@ void wallet2::fast_refresh(uint64_t stop_height, uint64_t &blocks_start_height, } } + +bool wallet2::add_address_book_row(const cryptonote::account_public_address &address, const crypto::hash &payment_id, const std::string &description) +{ + wallet2::address_book_row a; + a.m_address = address; + a.m_payment_id = payment_id; + a.m_description = description; + + int key = (m_address_book.empty())? 0 : m_address_book.rbegin()->first; + bool r = m_address_book.emplace(++key,a).second; + return r; +} + +bool wallet2::delete_address_book_row(int row_id) { + return (m_address_book.erase(row_id) > 0); +} + //---------------------------------------------------------------------------------------------------- void wallet2::refresh(uint64_t start_height, uint64_t & blocks_fetched, bool& received_money) { @@ -3186,7 +3203,7 @@ uint64_t wallet2::get_dynamic_per_kb_fee_estimate() //---------------------------------------------------------------------------------------------------- uint64_t wallet2::get_per_kb_fee() { - bool use_dyn_fee = use_fork_rules(HF_VERSION_DYNAMIC_FEE, -720 * 14); + bool use_dyn_fee = use_fork_rules(HF_VERSION_DYNAMIC_FEE, -720 * 1); if (!use_dyn_fee) return FEE_PER_KB; try |