search by output global idx added

This commit is contained in:
moneroexamples 2016-05-10 03:13:08 +00:00
parent 2b28eaf750
commit 319d1de1e7
3 changed files with 9 additions and 16 deletions

View File

@ -30,12 +30,12 @@ The key features of the Onion Monero Blockchain Explorer are
- made fully in C++,
- the only explorer showing encrypted payments ID,
- the only explorer with the ability to search by encrypted payments ID, tx public,
keys, outputs public keys, input key images,
keys, outputs public keys, input key images, output global indices,
- the only explorer showing ring signatures,
- the only explorer that can show which outputs belong to the given Monero address and viewkey,
- the only explorer showing detailed information about mixins, such as, mixins'
age, timescale, mixin of mixins,
- the only explorer showing total number of outputs for a given amount.
- the only explorer correctly showing global output indices as well as thier amount indices.
## Prerequisite

View File

@ -1512,13 +1512,6 @@ namespace xmreg {
// seach for output using output global index
// an empty result, as this is not returned by mylmdb search method
all_possible_tx_hashes.push_back(
make_pair("output_public_keys_based_on_global_idx",
vector<string>{}));
cout << "search_text.substr(4): " << search_text.substr(4) << endl;
if (search_for_global_output_idx)
@ -1535,13 +1528,11 @@ namespace xmreg {
output_data_t output_data = core_storage->get_db()
.get_output_key(global_idx);
tx_out_index tx_out = core_storage->get_db()
.get_output_tx_and_index_from_global(global_idx);
//tx_out_index tx_out = core_storage->get_db()
// .get_output_tx_and_index_from_global(global_idx);
cout << "tx_out.first: " << tx_out.first << endl;
cout << "tx_out.second: " << tx_out.second << endl;
cout << "output_pub_key: " << output_data.pubkey << endl;
//cout << "tx_out.first: " << tx_out.first << endl;
//cout << "tx_out.second: " << tx_out.second << endl;
string output_pub_key = pod_to_hex(output_data.pubkey);
@ -1685,6 +1676,8 @@ namespace xmreg {
// tx hashes for key_image searched were found
context.insert({"has_" + found_txs.first, !found_txs.second.empty()});
cout << "found_txs.first: " << found_txs.first << endl;
// insert new array based on what we found to context if not exist
pair< mstch::map::iterator, bool> res
= context.insert({found_txs.first, mstch::array{}});

View File

@ -92,7 +92,7 @@
<div class="center">
<form action="/search" method="get" style="width:100%; margin-top:15px" class="style-1">
<input type="text" name="value" size="100"
placeholder="blk height, blk hash, tx hash, tx payment id, encrypted payment id, tx public key, input key image or output public key ">
placeholder="blk height, blk hash, tx hash, tx payment id, encrypted payment id, tx public key, input key image, output public key, and goi:output global idx ">
<input type="submit" value="Search">
</form>
</div>