diff options
author | Alexander Blair <snipa@jagtech.io> | 2020-08-16 12:50:43 -0700 |
---|---|---|
committer | Alexander Blair <snipa@jagtech.io> | 2020-08-16 12:50:43 -0700 |
commit | 43f91ee12ec9cd539e011b7b551d66659fb3188a (patch) | |
tree | 86ea969251f1dd5f807f0ad15557fde96dd2be25 | |
parent | Merge pull request #6698 (diff) | |
parent | daemon: don't print "(pruned)" for coinbase txes (diff) | |
download | monero-43f91ee12ec9cd539e011b7b551d66659fb3188a.tar.xz |
Merge pull request #6703
8baa7bb23 daemon: don't print "(pruned)" for coinbase txes (moneromooo-monero)
-rw-r--r-- | src/daemon/rpc_command_executor.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/daemon/rpc_command_executor.cpp b/src/daemon/rpc_command_executor.cpp index 2514491ef..adaa9bc0e 100644 --- a/src/daemon/rpc_command_executor.cpp +++ b/src/daemon/rpc_command_executor.cpp @@ -1003,7 +1003,9 @@ bool t_rpc_command_executor::print_transaction(crypto::hash transaction_hash, if (1 == res.txs.size()) { // only available for new style answers - bool pruned = res.txs.front().prunable_as_hex.empty() && res.txs.front().prunable_hash != epee::string_tools::pod_to_hex(crypto::null_hash); + static const std::string empty_hash = epee::string_tools::pod_to_hex(crypto::cn_fast_hash("", 0)); + // prunable_hash will equal empty_hash when nothing is prunable (mostly when the transaction is coinbase) + bool pruned = res.txs.front().prunable_as_hex.empty() && res.txs.front().prunable_hash != epee::string_tools::pod_to_hex(crypto::null_hash) && res.txs.front().prunable_hash != empty_hash; if (res.txs.front().in_pool) tools::success_msg_writer() << "Found in pool"; else |