|
|
|
@ -1447,12 +1447,21 @@ namespace xmreg {
|
|
|
|
|
vector<pair<string, vector<string>>> all_possible_tx_hashes;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
xmreg::MyLMDB mylmdb {lmdb2_path};
|
|
|
|
|
|
|
|
|
|
// search the custum lmdb for key_images and append the result
|
|
|
|
|
// to those from the mempool search if found
|
|
|
|
|
|
|
|
|
|
mylmdb.search(search_text,
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
unique_ptr<xmreg::MyLMDB> mylmdb;
|
|
|
|
|
|
|
|
|
|
if (!bf::is_directory(lmdb2_path))
|
|
|
|
|
{
|
|
|
|
|
throw std::runtime_error(lmdb2_path + " does not exist");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
mylmdb = make_unique<xmreg::MyLMDB>(lmdb2_path);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mylmdb->search(search_text,
|
|
|
|
|
tx_search_results["key_images"],
|
|
|
|
|
"key_images");
|
|
|
|
|
|
|
|
|
@ -1466,7 +1475,7 @@ namespace xmreg {
|
|
|
|
|
// search the custum lmdb for tx_public_keys and append the result
|
|
|
|
|
// to those from the mempool search if found
|
|
|
|
|
|
|
|
|
|
mylmdb.search(search_text,
|
|
|
|
|
mylmdb->search(search_text,
|
|
|
|
|
tx_search_results["tx_public_keys"],
|
|
|
|
|
"tx_public_keys");
|
|
|
|
|
|
|
|
|
@ -1477,7 +1486,7 @@ namespace xmreg {
|
|
|
|
|
// search the custum lmdb for payments_id and append the result
|
|
|
|
|
// to those from the mempool search if found
|
|
|
|
|
|
|
|
|
|
mylmdb.search(search_text,
|
|
|
|
|
mylmdb->search(search_text,
|
|
|
|
|
tx_search_results["payments_id"],
|
|
|
|
|
"payments_id");
|
|
|
|
|
|
|
|
|
@ -1488,7 +1497,7 @@ namespace xmreg {
|
|
|
|
|
// search the custum lmdb for encrypted_payments_id and append the result
|
|
|
|
|
// to those from the mempool search if found
|
|
|
|
|
|
|
|
|
|
mylmdb.search(search_text,
|
|
|
|
|
mylmdb->search(search_text,
|
|
|
|
|
tx_search_results["encrypted_payments_id"],
|
|
|
|
|
"encrypted_payments_id");
|
|
|
|
|
|
|
|
|
@ -1499,7 +1508,7 @@ namespace xmreg {
|
|
|
|
|
// search the custum lmdb for output_public_keys and append the result
|
|
|
|
|
// to those from the mempool search if found
|
|
|
|
|
|
|
|
|
|
mylmdb.search(search_text,
|
|
|
|
|
mylmdb->search(search_text,
|
|
|
|
|
tx_search_results["output_public_keys"],
|
|
|
|
|
"output_public_keys");
|
|
|
|
|
|
|
|
|
@ -1536,7 +1545,7 @@ namespace xmreg {
|
|
|
|
|
|
|
|
|
|
vector<string> found_outputs;
|
|
|
|
|
|
|
|
|
|
mylmdb.search(output_pub_key,
|
|
|
|
|
mylmdb->search(output_pub_key,
|
|
|
|
|
found_outputs,
|
|
|
|
|
"output_public_keys");
|
|
|
|
|
|
|
|
|
@ -1552,7 +1561,7 @@ namespace xmreg {
|
|
|
|
|
cerr << "Cant cast global_idx string: "
|
|
|
|
|
<< search_text.substr(4) << endl;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} // if (search_for_global_output_idx)
|
|
|
|
|
|
|
|
|
|
// seach for output using output amount index and amount
|
|
|
|
|
|
|
|
|
@ -1595,7 +1604,7 @@ namespace xmreg {
|
|
|
|
|
|
|
|
|
|
vector<string> found_outputs;
|
|
|
|
|
|
|
|
|
|
mylmdb.search(output_pub_key,
|
|
|
|
|
mylmdb->search(output_pub_key,
|
|
|
|
|
found_outputs,
|
|
|
|
|
"output_public_keys");
|
|
|
|
|
|
|
|
|
@ -1619,6 +1628,18 @@ namespace xmreg {
|
|
|
|
|
return(string("Output not found in the blockchain: ")
|
|
|
|
|
+ search_text.substr(4));
|
|
|
|
|
}
|
|
|
|
|
} // if (search_for_amount_output_idx)
|
|
|
|
|
}
|
|
|
|
|
catch (const lmdb::runtime_error& e)
|
|
|
|
|
{
|
|
|
|
|
cerr << "Error opening/accessing custom lmdb database: "
|
|
|
|
|
<< e.what() << endl;
|
|
|
|
|
}
|
|
|
|
|
catch (...)
|
|
|
|
|
{
|
|
|
|
|
std::exception_ptr p = std::current_exception();
|
|
|
|
|
cerr << "Error opening/accessing custom lmdb database: "
|
|
|
|
|
<< p.__cxa_exception_type()->name() << endl;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|