aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2015-08-26 08:28:58 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2015-08-26 08:28:58 +0100
commit5dc53c2cb0236b63cdbc7e77c4e6b5d992bc1b1b (patch)
tree54d09dc58510191390fa3ce2e593c47f4827d31e
parentMerge pull request #386 (diff)
downloadmonero-5dc53c2cb0236b63cdbc7e77c4e6b5d992bc1b1b.tar.xz
wallet: use mutex protected random generation api
Diffstat (limited to '')
-rw-r--r--src/simplewallet/simplewallet.cpp2
-rw-r--r--src/wallet/wallet_rpc_server.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp
index ff60ea38e..585af35ea 100644
--- a/src/simplewallet/simplewallet.cpp
+++ b/src/simplewallet/simplewallet.cpp
@@ -1784,7 +1784,7 @@ bool simple_wallet::print_integrated_address(const std::vector<std::string> &arg
}
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("Matching integrated address: ") << m_wallet->get_account().get_public_integrated_address_str(payment_id, m_wallet->testnet());
return true;
diff --git a/src/wallet/wallet_rpc_server.cpp b/src/wallet/wallet_rpc_server.cpp
index a3b468505..6c3cd2957 100644
--- a/src/wallet/wallet_rpc_server.cpp
+++ b/src/wallet/wallet_rpc_server.cpp
@@ -356,7 +356,7 @@ namespace tools
crypto::hash8 payment_id;
if (req.payment_id.empty())
{
- crypto::generate_random_bytes(8, payment_id.data);
+ payment_id = crypto::rand<crypto::hash8>();
}
else
{