diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-06-02 13:06:41 +0100 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-06-27 21:38:21 +0100 |
commit | dcbc17e97e782d168d1653e216d415bb4d34a892 (patch) | |
tree | a4702dae618ce6965765af1008aad4673af867e4 /src/wallet/wallet2.h | |
parent | Merge pull request #3716 (diff) | |
download | monero-dcbc17e97e782d168d1653e216d415bb4d34a892.tar.xz |
wallet: include a suggested number of confirmations based on amount
This is based on how much an attacking miner stands to lose in block
rewardy by mining a private chain which double spends a payment.
This is not foolproof, since mining is based on luck, and breaks
down as the attacking miner nears 50% of the network hash rate,
and the estimation is based on a constant block reward.
Diffstat (limited to 'src/wallet/wallet2.h')
-rw-r--r-- | src/wallet/wallet2.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/wallet/wallet2.h b/src/wallet/wallet2.h index 2da6dd21a..ba5df9828 100644 --- a/src/wallet/wallet2.h +++ b/src/wallet/wallet2.h @@ -762,6 +762,9 @@ namespace tools void rescan_blockchain(bool refresh = true); bool is_transfer_unlocked(const transfer_details& td) const; bool is_transfer_unlocked(uint64_t unlock_time, uint64_t block_height) const; + + uint64_t get_last_block_reward() const { return m_last_block_reward; } + template <class t_archive> inline void serialize(t_archive &a, const unsigned int ver) { @@ -863,6 +866,9 @@ namespace tools if(ver < 24) return; a & m_ring_history_saved; + if(ver < 25) + return; + a & m_last_block_reward; } /*! @@ -1298,9 +1304,11 @@ namespace tools bool m_ring_history_saved; std::unique_ptr<ringdb> m_ringdb; boost::optional<crypto::chacha_key> m_ringdb_key; + + uint64_t m_last_block_reward; }; } -BOOST_CLASS_VERSION(tools::wallet2, 24) +BOOST_CLASS_VERSION(tools::wallet2, 25) BOOST_CLASS_VERSION(tools::wallet2::transfer_details, 9) BOOST_CLASS_VERSION(tools::wallet2::multisig_info, 1) BOOST_CLASS_VERSION(tools::wallet2::multisig_info::LR, 0) |