uaktags / explorer

An open source block explorer
BSD 3-Clause "New" or "Revised" License
6 stars 8 forks source link

TX Search Error - Page isn't working #17

Closed spy0012 closed 5 years ago

spy0012 commented 5 years ago

When searching for a TX you get a page isn't working error instead of a explorer can't find error. The block i tried to search was a payment to self, it does require 20 confirmations so may not be in the explorer yet.

search url goes to example.com/block/dcb75512cd2b4bb24b0f4c5d5eaa0a27cdb8ae422de8ad67f8cee1270efe576b which is a web error rather than a explorer error.

Seems to be if the transaction isn't in the DB yet, but i think it should go to an internal error rather than browser error, not sure if that is how it should work.

uaktags commented 5 years ago

Wasn't this fixed with #11 ? Results not found it produces the error message? Does that still work with a blank search? Also does searching for a block work by number (like searching for 2)?

uaktags commented 5 years ago

Or is it only when you provide it a 64bit string like a tx/block that it doesn't know. Does a valid tx and block work? And if so, if you give it another coin's block, does that work? For example, does searching for de2314301d3b2c04016237458649931e1479618b53c5dddaa7328f3fd18e6ae6 work?

spy0012 commented 5 years ago

Empty search still works as per your fix, searching for 2 works or any valid block.

Searching for a transaction ID i think when it's not confirmed throws the browser error same as the empty search did

Searched d7f80efdee1ef5edc4875ee83801f0643a038fe94cdf9aa99eba2737f552a4d0 just now 1 confirmation and blank error page that search goes to /block/ browser error not /tx like a valid search would

/block/de2314301d3b2c04016237458649931e1479618b53c5dddaa7328f3fd18e6ae6 is were it leads and the page generate browser error page isn't working

spy0012 commented 5 years ago

Confirmed transactions do work, the explorer is 20 blocks behind actual, as confirmations for my coin is 20

Seems unconfirmed or fake transactions go to browser error rather than Error: search found no results or whatever the error should be.

uaktags commented 5 years ago

Gotcha, yep found the error. Fix will be incoming. Proper mechanic is it's suppose to check against the RPC, but when I added the ability to avoid the node-api, i lost some hardcoded values that the node-api used.