daemon: don't print "(pruned)" for coinbase txes

Pruned coinbase txes are the same as unpruned ones, so the
prunable data is empty
This commit is contained in:
moneromooo-monero 2020-07-11 10:34:58 +00:00
parent cb882dfc55
commit 8baa7bb238
No known key found for this signature in database
GPG Key ID: 686F07454D6CEFC3
1 changed files with 3 additions and 1 deletions

View File

@ -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