diff options
author | Riccardo Spagni <ric@spagni.net> | 2015-08-24 21:38:25 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2015-08-24 21:38:29 +0200 |
commit | 96104ff2b5b2de2786090f22e273d02a0da13441 (patch) | |
tree | 01efcc9a510c0878daaff8f32b01b47e1a3e5acb /src/wallet/wallet_rpc_server.cpp | |
parent | Merge pull request #385 (diff) | |
parent | wallet: only return tx keys via RPC if requested (diff) | |
download | monero-96104ff2b5b2de2786090f22e273d02a0da13441.tar.xz |
Merge pull request #386
d91eb8c wallet: only return tx keys via RPC if requested (moneromooo-monero)
Diffstat (limited to '')
-rw-r--r-- | src/wallet/wallet_rpc_server.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/wallet/wallet_rpc_server.cpp b/src/wallet/wallet_rpc_server.cpp index 0682f7743..a3b468505 100644 --- a/src/wallet/wallet_rpc_server.cpp +++ b/src/wallet/wallet_rpc_server.cpp @@ -218,7 +218,8 @@ namespace tools // populate response with tx hash res.tx_hash = boost::lexical_cast<std::string>(cryptonote::get_transaction_hash(ptx_vector.back().tx)); - res.tx_key = boost::lexical_cast<std::string>(ptx_vector.back().tx_key); + if (req.get_tx_key) + res.tx_key = boost::lexical_cast<std::string>(ptx_vector.back().tx_key); return true; } catch (const tools::error::daemon_busy& e) @@ -275,7 +276,8 @@ namespace tools for (auto & ptx : ptx_vector) { res.tx_hash_list.push_back(boost::lexical_cast<std::string>(cryptonote::get_transaction_hash(ptx.tx))); - res.tx_key_list.push_back(boost::lexical_cast<std::string>(ptx.tx_key)); + if (req.get_tx_keys) + res.tx_key_list.push_back(boost::lexical_cast<std::string>(ptx.tx_key)); } return true; @@ -320,7 +322,8 @@ namespace tools for (auto & ptx : ptx_vector) { res.tx_hash_list.push_back(boost::lexical_cast<std::string>(cryptonote::get_transaction_hash(ptx.tx))); - res.tx_key_list.push_back(boost::lexical_cast<std::string>(ptx.tx_key)); + if (req.get_tx_keys) + res.tx_key_list.push_back(boost::lexical_cast<std::string>(ptx.tx_key)); } return true; |