aboutsummaryrefslogtreecommitdiff
path: root/src/daemon
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2020-07-11 10:34:58 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2020-07-24 13:42:20 +0000
commit8baa7bb23869462889dd7105d75a815c08890732 (patch)
treed2ac5873808d6764f2cfead9525a4f931336c09e /src/daemon
parentMerge pull request #6670 (diff)
downloadmonero-8baa7bb23869462889dd7105d75a815c08890732.tar.xz
daemon: don't print "(pruned)" for coinbase txes
Pruned coinbase txes are the same as unpruned ones, so the prunable data is empty
Diffstat (limited to 'src/daemon')
-rw-r--r--src/daemon/rpc_command_executor.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/daemon/rpc_command_executor.cpp b/src/daemon/rpc_command_executor.cpp
index 859cfc92a..fc599a3d4 100644
--- a/src/daemon/rpc_command_executor.cpp
+++ b/src/daemon/rpc_command_executor.cpp
@@ -1001,7 +1001,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