|
|
@ -201,14 +201,18 @@ namespace xmreg {
|
|
|
|
rpccalls rpc;
|
|
|
|
rpccalls rpc;
|
|
|
|
time_t server_timestamp;
|
|
|
|
time_t server_timestamp;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
string lmdb2_path;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
|
|
page(MicroCore* _mcore, Blockchain* _core_storage, string deamon_url)
|
|
|
|
page(MicroCore* _mcore, Blockchain* _core_storage,
|
|
|
|
|
|
|
|
string _deamon_url, string _lmdb2_path)
|
|
|
|
: mcore {_mcore},
|
|
|
|
: mcore {_mcore},
|
|
|
|
core_storage {_core_storage},
|
|
|
|
core_storage {_core_storage},
|
|
|
|
rpc {deamon_url},
|
|
|
|
rpc {_deamon_url},
|
|
|
|
server_timestamp {std::time(nullptr)}
|
|
|
|
server_timestamp {std::time(nullptr)},
|
|
|
|
|
|
|
|
lmdb2_path {_lmdb2_path}
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1097,20 +1101,6 @@ namespace xmreg {
|
|
|
|
cerr << e.what() << endl;
|
|
|
|
cerr << e.what() << endl;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// get global indices of outputs
|
|
|
|
|
|
|
|
vector<uint64_t> out_global_indices;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
core_storage->get_tx_outputs_gindexs(txd.hash,
|
|
|
|
|
|
|
|
out_global_indices);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
catch(const exception& e)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
cerr << e.what() << endl;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
uint64_t output_idx {0};
|
|
|
|
uint64_t output_idx {0};
|
|
|
|
|
|
|
|
|
|
|
|
mstch::array outputs;
|
|
|
|
mstch::array outputs;
|
|
|
@ -1122,16 +1112,6 @@ namespace xmreg {
|
|
|
|
uint64_t num_outputs_amount = core_storage->get_db()
|
|
|
|
uint64_t num_outputs_amount = core_storage->get_db()
|
|
|
|
.get_num_outputs(outp.second);
|
|
|
|
.get_num_outputs(outp.second);
|
|
|
|
|
|
|
|
|
|
|
|
string out_global_index_str {"N/A"};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// outputs in tx in them mempool dont have yet global indices
|
|
|
|
|
|
|
|
// thus for them, we print N/A
|
|
|
|
|
|
|
|
if (!out_global_indices.empty())
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
out_global_index_str = fmt::format("{:d}",
|
|
|
|
|
|
|
|
out_global_indices.at(output_idx));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
string out_amount_index_str {"N/A"};
|
|
|
|
string out_amount_index_str {"N/A"};
|
|
|
|
|
|
|
|
|
|
|
|
// outputs in tx in them mempool dont have yet global indices
|
|
|
|
// outputs in tx in them mempool dont have yet global indices
|
|
|
@ -1145,7 +1125,6 @@ namespace xmreg {
|
|
|
|
outputs.push_back(mstch::map {
|
|
|
|
outputs.push_back(mstch::map {
|
|
|
|
{"out_pub_key" , REMOVE_HASH_BRAKETS(fmt::format("{:s}", outp.first.key))},
|
|
|
|
{"out_pub_key" , REMOVE_HASH_BRAKETS(fmt::format("{:s}", outp.first.key))},
|
|
|
|
{"amount" , fmt::format("{:0.12f}", XMR_AMOUNT(outp.second))},
|
|
|
|
{"amount" , fmt::format("{:0.12f}", XMR_AMOUNT(outp.second))},
|
|
|
|
{"global_idx" , out_global_index_str},
|
|
|
|
|
|
|
|
{"amount_idx" , out_amount_index_str},
|
|
|
|
{"amount_idx" , out_amount_index_str},
|
|
|
|
{"num_outputs" , fmt::format("{:d}", num_outputs_amount)},
|
|
|
|
{"num_outputs" , fmt::format("{:d}", num_outputs_amount)},
|
|
|
|
{"output_idx" , fmt::format("{:02d}", output_idx++)}
|
|
|
|
{"output_idx" , fmt::format("{:02d}", output_idx++)}
|
|
|
@ -1467,8 +1446,8 @@ namespace xmreg {
|
|
|
|
|
|
|
|
|
|
|
|
vector<pair<string, vector<string>>> all_possible_tx_hashes;
|
|
|
|
vector<pair<string, vector<string>>> all_possible_tx_hashes;
|
|
|
|
|
|
|
|
|
|
|
|
//@TODO make lmdb2 path to some option
|
|
|
|
|
|
|
|
xmreg::MyLMDB mylmdb {"/home/mwo/.bitmonero/lmdb2"};
|
|
|
|
xmreg::MyLMDB mylmdb {lmdb2_path};
|
|
|
|
|
|
|
|
|
|
|
|
// search the custum lmdb for key_images and append the result
|
|
|
|
// search the custum lmdb for key_images and append the result
|
|
|
|
// to those from the mempool search if found
|
|
|
|
// to those from the mempool search if found
|
|
|
|