aboutsummaryrefslogtreecommitdiff
path: root/src/daemon/command_parser_executor.cpp
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2016-01-31 15:19:40 +0200
committerRiccardo Spagni <ric@spagni.net>2016-01-31 15:19:40 +0200
commitac961f66f69642563fe46c3be40efdad521c2c4e (patch)
treec662b2241380a793c64c2f1254de14cdf34339c8 /src/daemon/command_parser_executor.cpp
parentb91fc2dc3c4489f44a74915ae80fd1968d150302 (diff)
parentbf6d1474c097ee0affe827fe2e3dac489b290f40 (diff)
downloadmonzero-core-ac961f66f69642563fe46c3be40efdad521c2c4e.tar.gz
monzero-core-ac961f66f69642563fe46c3be40efdad521c2c4e.tar.xz
monzero-core-ac961f66f69642563fe46c3be40efdad521c2c4e.zip
Merge pull request #630
bf6d147 new flush_txpool command, and associated RPC call (moneromooo-monero) 6288295 rpc: add missing return on error when getting a tx (moneromooo-monero) b7e37b7 simplewallet: show_transfers can now show just failed txes (moneromooo-monero) b11539f wallet: detect and handle failed outgoing transfers (moneromooo-monero) 4b23714 tx_pool: serialize missing kept_by_block flag (moneromooo-monero)
Diffstat (limited to 'src/daemon/command_parser_executor.cpp')
-rw-r--r--src/daemon/command_parser_executor.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/daemon/command_parser_executor.cpp b/src/daemon/command_parser_executor.cpp
index d1d48b6da..0b42257e7 100644
--- a/src/daemon/command_parser_executor.cpp
+++ b/src/daemon/command_parser_executor.cpp
@@ -421,5 +421,23 @@ bool t_command_parser_executor::unban(const std::vector<std::string>& args)
return m_executor.unban(ip);
}
+bool t_command_parser_executor::flush_txpool(const std::vector<std::string>& args)
+{
+ if (args.size() > 1) return false;
+
+ std::string txid;
+ if (args.size() == 1)
+ {
+ crypto::hash hash;
+ if (!parse_hash256(args[0], hash))
+ {
+ std::cout << "failed to parse tx id" << std::endl;
+ return true;
+ }
+ txid = args[0];
+ }
+ return m_executor.flush_txpool(txid);
+}
+
} // namespace daemonize