diff --git a/html/js/config.js b/html/js/config.js
index 784a9c3..5070a4b 100755
--- a/html/js/config.js
+++ b/html/js/config.js
@@ -3,7 +3,7 @@ var config = {
mainnetExplorerUrl: "https://xmrchain.com/",
testnetExplorerUrl: "https://testnet.xmrchain.com/",
stagenetExplorerUrl: "http://139.162.60.17:8082/",
- nettype: 2, /* 0 - MAINNET, 1 - TESTNET, 2 - STAGENET */
+ nettype: 0, /* 0 - MAINNET, 1 - TESTNET, 2 - STAGENET */
coinUnitPlaces: 12,
txMinConfirms: 10, // corresponds to CRYPTONOTE_DEFAULT_TX_SPENDABLE_AGE in Monero
txCoinbaseMinConfirms: 60, // corresponds to CRYPTONOTE_MINED_MONEY_UNLOCK_WINDOW in Monero
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 6029068..7ba8600 100755
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -11,7 +11,6 @@ set(SOURCE_FILES
OpenMoneroRequests.cpp
TxSearch.cpp
RPCCalls.cpp
- OutputInputIdentification.cpp
omversion.h.in
BlockchainSetup.cpp
ThreadRAII.cpp
diff --git a/src/CurrentBlockchainStatus.cpp b/src/CurrentBlockchainStatus.cpp
index 542eda1..e0a3200 100755
--- a/src/CurrentBlockchainStatus.cpp
+++ b/src/CurrentBlockchainStatus.cpp
@@ -1236,5 +1236,39 @@ CurrentBlockchainStatus::get_txs_in_blocks(
return true;
}
+
+
+
+MicroCoreAdapter::MicroCoreAdapter(CurrentBlockchainStatus* _cbs)
+: cbs {_cbs}
+{}
+
+void
+MicroCoreAdapter::get_output_key(uint64_t amount,
+ vector const& absolute_offsets,
+ vector& outputs)
+ const
+{
+ cbs->get_output_keys(amount, absolute_offsets, outputs);
+}
+
+void
+MicroCoreAdapter::get_output_tx_and_index(
+ uint64_t amount,
+ std::vector const& offsets,
+ std::vector& indices)
+ const
+{
+ cbs->get_output_tx_and_index(amount, offsets, indices);
+}
+
+bool
+MicroCoreAdapter::get_tx(crypto::hash const& tx_hash, transaction& tx)
+ const
+{
+ return cbs->get_tx(tx_hash, tx);
+}
+
+
}
diff --git a/src/CurrentBlockchainStatus.h b/src/CurrentBlockchainStatus.h
index f8b0ed0..ebec8de 100755
--- a/src/CurrentBlockchainStatus.h
+++ b/src/CurrentBlockchainStatus.h
@@ -359,5 +359,38 @@ protected:
};
+// small adapter class that will anable using
+// BlockchainCurrentStatus inside UniversalAdapter
+// for locating inputs. We do this becasuse
+// BlockchainCurrentStatus is using a thread pool
+// to access MicroCore and blockchain. So we don't want
+// to miss on that. Also UnversalAdapter for Inputs
+// takes AbstractCore interface
+class MicroCoreAdapter : public AbstractCore
+{
+public:
+ MicroCoreAdapter(CurrentBlockchainStatus* _cbs);
+
+ virtual void
+ get_output_key(uint64_t amount,
+ vector const& absolute_offsets,
+ vector& outputs)
+ const override;
+
+ virtual void
+ get_output_tx_and_index(
+ uint64_t amount,
+ std::vector const& offsets,
+ std::vector& indices)
+ const override;
+
+ virtual bool
+ get_tx(crypto::hash const& tx_hash, transaction& tx)
+ const override;
+
+ private:
+ CurrentBlockchainStatus* cbs {};
+};
+
}
diff --git a/src/OpenMoneroRequests.cpp b/src/OpenMoneroRequests.cpp
index b494deb..ccc346e 100755
--- a/src/OpenMoneroRequests.cpp
+++ b/src/OpenMoneroRequests.cpp
@@ -9,7 +9,6 @@
#include "src/UniversalIdentifier.hpp"
#include "db/ssqlses.h"
-#include "OutputInputIdentification.h"
#include "version.h"
#include "../gen/omversion.h"
@@ -1545,6 +1544,8 @@ OpenMoneroRequests::get_tx(
address_parse_info address_info;
secret_key viewkey;
+ MicroCoreAdapter mcore_addapter {current_bc_status.get()};
+
// to get info about recived xmr in this tx, we calculate it from
// scrach, i.e., search for outputs. We could get this info
// directly from the database, but doing it again here, is a good way
@@ -1557,21 +1558,16 @@ OpenMoneroRequests::get_tx(
if (current_bc_status->get_xmr_address_viewkey(
xmr_address, address_info, viewkey))
{
- OutputInputIdentification oi_identification {
- &address_info, &viewkey, &tx, tx_hash,
- coinbase};
-
- oi_identification.identify_outputs();
+
+ auto identifier = make_identifier(tx,
+ make_unique