aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-07-30 13:33:02 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-07-30 13:34:15 +0100
commit0f757177fe9b8128d2507a8d57911fb51d667696 (patch)
treed6b674e7cde971f85bd24c19cb580691b8bfadbb /src/wallet
parentMerge pull request #4129 (diff)
downloadmonero-0f757177fe9b8128d2507a8d57911fb51d667696.tar.xz
wallet2: avoid using arbitrary random values when unknown
Diffstat (limited to 'src/wallet')
-rw-r--r--src/wallet/wallet2.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
index 90807803a..ed0964004 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -10056,11 +10056,10 @@ uint64_t wallet2::import_key_images(const std::vector<std::pair<crypto::key_imag
{
const transfer_details& td = m_transfers[n];
confirmed_transfer_details pd;
- pd.m_change = (uint64_t)-1; // cahnge is unknown
+ pd.m_change = (uint64_t)-1; // change is unknown
pd.m_amount_in = pd.m_amount_out = td.amount(); // fee is unknown
- std::string err;
- pd.m_block_height = get_daemon_blockchain_height(err); // spent block height is unknown, so hypothetically set to the highest
- crypto::hash spent_txid = crypto::rand<crypto::hash>(); // spent txid is unknown, so hypothetically set to random
+ pd.m_block_height = 0; // spent block height is unknown
+ const crypto::hash &spent_txid = crypto::null_hash; // spent txid is unknown
m_confirmed_txs.insert(std::make_pair(spent_txid, pd));
}
}