From f4e3b4cc8ef1daea6c36b7988129ceee2bf9d90e Mon Sep 17 00:00:00 2001 From: moneroexamples Date: Wed, 11 Jan 2017 01:53:44 +0000 Subject: [PATCH] fix: pseudoOuts added to txs from mempool --- src/TxSearch.cpp | 2 +- src/tools.cpp | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/TxSearch.cpp b/src/TxSearch.cpp index 236065c..c87f8f4 100644 --- a/src/TxSearch.cpp +++ b/src/TxSearch.cpp @@ -65,7 +65,7 @@ TxSearch::search() uint64_t loop_timestamp {current_timestamp}; - if (loop_idx % 2 == 0) + if (loop_idx % 5 == 0) { // get loop time every second iteration. no need to call it // all the time. diff --git a/src/tools.cpp b/src/tools.cpp index f068c08..d2f677b 100644 --- a/src/tools.cpp +++ b/src/tools.cpp @@ -1119,6 +1119,24 @@ make_tx_from_json(const string& json_str, transaction& tx) { rct::rctSig& rct_signatures = tx.rct_signatures; + if (j["rct_signatures"].find("pseudoOuts") != j["rct_signatures"].end()) + { + rct::keyV& pseudoOuts = rct_signatures.pseudoOuts; + + for (json& pOut: j["rct_signatures"]["pseudoOuts"]) + { + rct::key pOut_key; + + if (!epee::string_tools::hex_to_pod(pOut, pOut_key)) + { + cerr << "Faild to parse pOut_key of pseudoOuts from json" << endl; + return false; + } + + pseudoOuts.push_back(pOut_key); + } + } + vector& ecdhInfo = rct_signatures.ecdhInfo; for (json& ecdhI: j["rct_signatures"]["ecdhInfo"])