mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-30 03:03:17 +00:00
Merge pull request #4194
0f75717
wallet2: avoid using arbitrary random values when unknown (moneromooo-monero)
This commit is contained in:
commit
e69e0e9e34
1 changed files with 3 additions and 4 deletions
|
@ -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];
|
const transfer_details& td = m_transfers[n];
|
||||||
confirmed_transfer_details pd;
|
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
|
pd.m_amount_in = pd.m_amount_out = td.amount(); // fee is unknown
|
||||||
std::string err;
|
pd.m_block_height = 0; // spent block height is unknown
|
||||||
pd.m_block_height = get_daemon_blockchain_height(err); // spent block height is unknown, so hypothetically set to the highest
|
const crypto::hash &spent_txid = crypto::null_hash; // spent txid is unknown
|
||||||
crypto::hash spent_txid = crypto::rand<crypto::hash>(); // spent txid is unknown, so hypothetically set to random
|
|
||||||
m_confirmed_txs.insert(std::make_pair(spent_txid, pd));
|
m_confirmed_txs.insert(std::make_pair(spent_txid, pd));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue