mirror of
https://git.wownero.com/wownero/onion-wownero-blockchain-explorer.git
synced 2024-08-15 00:33:12 +00:00
code cleaning
This commit is contained in:
parent
3f2781e4f5
commit
e225e82cd7
3 changed files with 13 additions and 12 deletions
1
main.cpp
1
main.cpp
|
@ -32,6 +32,7 @@ int main(int ac, const char* av[]) {
|
||||||
|
|
||||||
auto port_opt = opts.get_option<string>("port");
|
auto port_opt = opts.get_option<string>("port");
|
||||||
auto bc_path_opt = opts.get_option<string>("bc-path");
|
auto bc_path_opt = opts.get_option<string>("bc-path");
|
||||||
|
auto custom_db_path_opt = opts.get_option<string>("custom-db-path");
|
||||||
auto deamon_url_opt = opts.get_option<string>("deamon-url");
|
auto deamon_url_opt = opts.get_option<string>("deamon-url");
|
||||||
|
|
||||||
//cast port number in string to uint16
|
//cast port number in string to uint16
|
||||||
|
|
|
@ -18,7 +18,7 @@ namespace xmreg
|
||||||
p.add("txhash", -1);
|
p.add("txhash", -1);
|
||||||
|
|
||||||
options_description desc(
|
options_description desc(
|
||||||
"showmixins, shows mixin outputs used for each input in a given transaction");
|
"xmrblocks, start Onion Monero Blockchain Explorer");
|
||||||
|
|
||||||
desc.add_options()
|
desc.add_options()
|
||||||
("help,h", value<bool>()->default_value(false)->implicit_value(true),
|
("help,h", value<bool>()->default_value(false)->implicit_value(true),
|
||||||
|
@ -27,6 +27,8 @@ namespace xmreg
|
||||||
"default port")
|
"default port")
|
||||||
("bc-path,b", value<string>(),
|
("bc-path,b", value<string>(),
|
||||||
"path to lmdb blockchain")
|
"path to lmdb blockchain")
|
||||||
|
("custom-db-path,c", value<string>(),
|
||||||
|
"path to the custom lmdb database used for searching things")
|
||||||
("deamon-url,d", value<string>()->default_value("http:://127.0.0.1:18081"),
|
("deamon-url,d", value<string>()->default_value("http:://127.0.0.1:18081"),
|
||||||
"monero address string");
|
"monero address string");
|
||||||
|
|
||||||
|
|
14
src/page.h
14
src/page.h
|
@ -215,6 +215,9 @@ namespace xmreg {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Show recent blocks and mempool
|
* @brief Show recent blocks and mempool
|
||||||
|
*
|
||||||
|
* Not used currently. index2 method is used instead
|
||||||
|
*
|
||||||
* @param page_no block page to show
|
* @param page_no block page to show
|
||||||
* @param refresh_page enable autorefresh
|
* @param refresh_page enable autorefresh
|
||||||
* @return rendered index page
|
* @return rendered index page
|
||||||
|
@ -567,6 +570,9 @@ namespace xmreg {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Render mempool data
|
||||||
|
*/
|
||||||
string
|
string
|
||||||
mempool()
|
mempool()
|
||||||
{
|
{
|
||||||
|
@ -1241,10 +1247,6 @@ namespace xmreg {
|
||||||
tx_hashes["encrypted_payments_id"] = {};
|
tx_hashes["encrypted_payments_id"] = {};
|
||||||
tx_hashes["output_public_keys"] = {};
|
tx_hashes["output_public_keys"] = {};
|
||||||
|
|
||||||
cout << "txs.size(): " << txs.size() << endl;
|
|
||||||
|
|
||||||
cout << "search_text: " << search_text << endl;
|
|
||||||
|
|
||||||
for (const transaction& tx: txs)
|
for (const transaction& tx: txs)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -1268,15 +1270,11 @@ namespace xmreg {
|
||||||
|
|
||||||
// check if tx_public_key matches the search_text
|
// check if tx_public_key matches the search_text
|
||||||
|
|
||||||
cout << "txd.pk: " << pod_to_hex(txd.pk) << endl;
|
|
||||||
|
|
||||||
if (pod_to_hex(txd.pk) == search_text)
|
if (pod_to_hex(txd.pk) == search_text)
|
||||||
{
|
{
|
||||||
tx_hashes["tx_public_keys"].push_back(tx_hash_str);
|
tx_hashes["tx_public_keys"].push_back(tx_hash_str);
|
||||||
}
|
}
|
||||||
|
|
||||||
cout << "txd.payment_id: " << txd.payment_id << endl;
|
|
||||||
|
|
||||||
// check if payments_id matches the search_text
|
// check if payments_id matches the search_text
|
||||||
|
|
||||||
if (pod_to_hex(txd.payment_id) == search_text)
|
if (pod_to_hex(txd.payment_id) == search_text)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue