aergoio / aergoscan

Aergo Blockchain Explorer

Home Page:http://aergoscan.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Search: check addresses in fullnode instead of db

graup opened this issue · comments

Looking for accounts in the meta db has some shortcomings: you can't find accounts allocated at genesis, you can't find newly created contracts. Why don't we just parse the input, see if it is a valid address, and if so ask the fullnode if the account exists.

The solution is even more simple: just try to parse the input as an address. If it doesn't throw, it's a valid address. No need to check if it actually exists.

Implemented in 4d2f59c