diff options
| author | luigi1111 <luigi1111w@gmail.com> | 2018-06-27 16:32:33 -0500 |
|---|---|---|
| committer | luigi1111 <luigi1111w@gmail.com> | 2018-06-27 16:32:33 -0500 |
| commit | 2329d2f4c818bd4dbb32d74e092440b9ce4be6a7 (patch) | |
| tree | c0ef74e14e433883cb79100157f92a069a453f21 /src/simplewallet/simplewallet.cpp | |
| parent | 8a27caeb22a05149a55d29842c07dcce552ad60e (diff) | |
| parent | dcbc17e97e782d168d1653e216d415bb4d34a892 (diff) | |
| download | monzero-core-2329d2f4c818bd4dbb32d74e092440b9ce4be6a7.tar.gz monzero-core-2329d2f4c818bd4dbb32d74e092440b9ce4be6a7.tar.xz monzero-core-2329d2f4c818bd4dbb32d74e092440b9ce4be6a7.zip | |
Merge pull request #3907
dcbc17e wallet: include a suggested number of confirmations based on amount (moneromooo-monero)
Diffstat (limited to 'src/simplewallet/simplewallet.cpp')
| -rw-r--r-- | src/simplewallet/simplewallet.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp index 50c2fa642..0b2d072d6 100644 --- a/src/simplewallet/simplewallet.cpp +++ b/src/simplewallet/simplewallet.cpp @@ -7424,8 +7424,12 @@ bool simple_wallet::show_transfer(const std::vector<std::string> &args) if (pd.m_unlock_time < CRYPTONOTE_MAX_BLOCK_NUMBER) { uint64_t bh = std::max(pd.m_unlock_time, pd.m_block_height + CRYPTONOTE_DEFAULT_TX_SPENDABLE_AGE); + uint64_t last_block_reward = m_wallet->get_last_block_reward(); + uint64_t suggested_threshold = last_block_reward ? (pd.m_amount + last_block_reward - 1) / last_block_reward : 0; if (bh >= last_block_height) success_msg_writer() << "Locked: " << (bh - last_block_height) << " blocks to unlock"; + else if (suggested_threshold > 0) + success_msg_writer() << std::to_string(last_block_height - bh) << " confirmations (" << suggested_threshold << " suggested threshold)"; else success_msg_writer() << std::to_string(last_block_height - bh) << " confirmations"; } |
