currency address validation #4
Labels
No Label
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: mike/fastapi#4
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
instead of address verification functions consider using regexe for initial address verification + json rpc validateaddress against daemon.
pros;
cons;
-- can these libraries be trusted to correctly verify addresses in all cases?
I chose the current way its coded because of the cons.
I'd rather not check it with the daemon each time when we can base58 decode it. A regex is not 100% safe, some incorrect addresses can still bypass the regex.
Examples;
I did a regex before but doing a base58 is better, is well, exactly what it needs. Addresses need to return a correct checksum to be validated. Same thing what a daemon does without the daemon.
As you can see in main.py, the network connection to the rpc and to the mysql is done after a lot of checks have been made, that to stop anyone from trying to send us bogus requests.
Also, its the customers responsibility to use a correct address.
If you want to take each byte of the code and read/rewrite it, we'll be done with this in 2030.