diff options
author | Riccardo Spagni <ric@spagni.net> | 2015-08-11 14:19:41 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2015-08-11 14:19:55 +0200 |
commit | 01e81205e07408da03340de9f2bd113e9801ca77 (patch) | |
tree | 1f636f1a59c16163b591a7555c988e10dabd31a7 /src/daemon/command_parser_executor.cpp | |
parent | Merge pull request #364 (diff) | |
parent | blockchain_db: match tx addition semantics to original code (diff) | |
download | monero-01e81205e07408da03340de9f2bd113e9801ca77.tar.xz |
Merge pull request #365
e63b854 blockchain_db: match tx addition semantics to original code (moneromooo-monero)
83bbea4 Add a is_key_image_spent daemon command and RPC call (moneromooo-monero)
35abef1 blockchain: remove dead code (moneromooo-monero)
Diffstat (limited to 'src/daemon/command_parser_executor.cpp')
-rw-r--r-- | src/daemon/command_parser_executor.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/daemon/command_parser_executor.cpp b/src/daemon/command_parser_executor.cpp index 58cb475ab..e6666c443 100644 --- a/src/daemon/command_parser_executor.cpp +++ b/src/daemon/command_parser_executor.cpp @@ -180,6 +180,26 @@ bool t_command_parser_executor::print_transaction(const std::vector<std::string> return true; } +bool t_command_parser_executor::is_key_image_spent(const std::vector<std::string>& args) +{ + if (args.empty()) + { + std::cout << "expected: is_key_image_spent <key_image>" << std::endl; + return true; + } + + const std::string& str = args.front(); + crypto::key_image ki; + crypto::hash hash; + if (parse_hash256(str, hash)) + { + memcpy(&ki, &hash, sizeof(ki)); + m_executor.is_key_image_spent(ki); + } + + return true; +} + bool t_command_parser_executor::print_transaction_pool_long(const std::vector<std::string>& args) { if (!args.empty()) return false; |