aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-06-12 11:58:12 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-06-12 11:59:13 +0000
commit14881094aff8e11c2523fcc2894bb4e24a95238f (patch)
tree2734f7177145742000537f09a8b2573241c4fd27
parentMerge pull request #5619 (diff)
downloadmonero-14881094aff8e11c2523fcc2894bb4e24a95238f.tar.xz
rpc: fix get_transactions getting v1 txes from the txpool
It would try to get their prunable hash, but v1 txes don't have one
-rw-r--r--src/rpc/core_rpc_server.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp
index 28c53d6e3..cc56150ef 100644
--- a/src/rpc/core_rpc_server.cpp
+++ b/src/rpc/core_rpc_server.cpp
@@ -583,7 +583,8 @@ namespace cryptonote
return true;
}
const cryptonote::blobdata pruned = ss.str();
- sorted_txs.push_back(std::make_tuple(h, pruned, get_transaction_prunable_hash(tx), std::string(i->tx_blob, pruned.size())));
+ const crypto::hash prunable_hash = tx.version == 1 ? crypto::null_hash : get_transaction_prunable_hash(tx);
+ sorted_txs.push_back(std::make_tuple(h, pruned, prunable_hash, std::string(i->tx_blob, pruned.size())));
missed_txs.erase(std::find(missed_txs.begin(), missed_txs.end(), h));
pool_tx_hashes.insert(h);
const std::string hash_string = epee::string_tools::pod_to_hex(h);