diff options
author | luigi1111 <luigi1111w@gmail.com> | 2018-08-15 17:56:23 -0500 |
---|---|---|
committer | luigi1111 <luigi1111w@gmail.com> | 2018-08-15 17:56:23 -0500 |
commit | e69e0e9e3405133c79c128e93c3dd4b4819b1a93 (patch) | |
tree | b0d04807bb8835b884b8629c4b37f3c638b78395 /src | |
parent | Merge pull request #4193 (diff) | |
parent | wallet2: avoid using arbitrary random values when unknown (diff) | |
download | monero-e69e0e9e3405133c79c128e93c3dd4b4819b1a93.tar.xz |
Merge pull request #4194
0f75717 wallet2: avoid using arbitrary random values when unknown (moneromooo-monero)
Diffstat (limited to 'src')
-rw-r--r-- | src/wallet/wallet2.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 4559ebd84..98412d08e 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -10199,11 +10199,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)); } } |