diff --git a/src/page.h b/src/page.h index 522bd7e..bcb6596 100644 --- a/src/page.h +++ b/src/page.h @@ -595,7 +595,7 @@ namespace xmreg { if (!xmreg::parse_str_secret_key(_blk_hash, blk_hash)) { cerr << "Cant parse blk hash: " << blk_hash << endl; - return fmt::format("Cant get block {:s}!", blk_hash); + return fmt::format("Cant get block {:s} due to block hash parse error!", blk_hash); } uint64_t blk_height; @@ -607,12 +607,12 @@ namespace xmreg { catch (const BLOCK_DNE& e) { cerr << "Block does not exist: " << blk_hash << endl; - return fmt::format("Cant get block {:s}!", blk_hash); + return fmt::format("Cant get block {:s} because it does not exist!", blk_hash); } catch (const std::exception& e) { cerr << "Cant get block: " << blk_hash << endl; - return fmt::format("Cant get block {:s}!", blk_hash); + return fmt::format("Cant get block {:s} for some uknown reason", blk_hash); } return show_block(blk_height); @@ -708,7 +708,7 @@ namespace xmreg { tx_blk_height_str = std::to_string(tx_blk_height); } - // payments id. both normal and encrypted (payment_id8) + // payments id. both normal and encrypted (payment_id8) string pid_str = REMOVE_HASH_BRAKETS(fmt::format("{:s}", txd.payment_id)); string pid8_str = REMOVE_HASH_BRAKETS(fmt::format("{:s}", txd.payment_id8)); @@ -884,7 +884,9 @@ namespace xmreg { // remove white characters boost::trim(search_text); - string result_html {"No such thing found: " + search_text}; + string default_txt {"No such thing found: " + search_text}; + + string result_html {default_txt}; // first check if searching for block of given height @@ -932,6 +934,8 @@ namespace xmreg { return result_html; } + result_html = default_txt; + xmreg::MyLMDB mylmdb {"/home/mwo/.bitmonero/lmdb2"}; vector tx_hashes = mylmdb.search(search_text, "key_images"); diff --git a/src/templates/header.html b/src/templates/header.html index 59ec9f7..3cca141 100644 --- a/src/templates/header.html +++ b/src/templates/header.html @@ -87,7 +87,7 @@
+ placeholder="block height, block hash, tx hash, tx payment id, tx public key, input key image or output public key ">