mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-30 14:53:27 +01:00
wallet: use mutex protected random generation api
This commit is contained in:
parent
96104ff2b5
commit
5dc53c2cb0
@ -1784,7 +1784,7 @@ bool simple_wallet::print_integrated_address(const std::vector<std::string> &arg
|
|||||||
}
|
}
|
||||||
if (args.size() == 0)
|
if (args.size() == 0)
|
||||||
{
|
{
|
||||||
crypto::generate_random_bytes(8, payment_id.data);
|
payment_id = crypto::rand<crypto::hash8>();
|
||||||
success_msg_writer() << tr("Random payment ID: ") << payment_id;
|
success_msg_writer() << tr("Random payment ID: ") << payment_id;
|
||||||
success_msg_writer() << tr("Matching integrated address: ") << m_wallet->get_account().get_public_integrated_address_str(payment_id, m_wallet->testnet());
|
success_msg_writer() << tr("Matching integrated address: ") << m_wallet->get_account().get_public_integrated_address_str(payment_id, m_wallet->testnet());
|
||||||
return true;
|
return true;
|
||||||
|
@ -356,7 +356,7 @@ namespace tools
|
|||||||
crypto::hash8 payment_id;
|
crypto::hash8 payment_id;
|
||||||
if (req.payment_id.empty())
|
if (req.payment_id.empty())
|
||||||
{
|
{
|
||||||
crypto::generate_random_bytes(8, payment_id.data);
|
payment_id = crypto::rand<crypto::hash8>();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user