- Queries
- All Stories
- Search
- Advanced Search
- Transactions
- Transaction Logs
All Stories
Sep 21 2021
Sep 20 2021
Good points. Address validation has been built up incrementally and is not currently in a great state. An additional complication is that the backend will (for now) only accept bitcoincash: or simpleledger: addresses.
Must include extended tests
I forgot the extended tests
fix a few more missing EXCLUSIVE_LOCKS_REQUIRED
fix two conflict resolution accidents
more work needed for [-Werror,-Wthread-safety-analysis] warnings
rebase after fixing the clang failure in D10163
@bot build-tsan
rebase
try adding annotation in function declaration in addition to run-time asserts in function definition
fix build-clang
fix build-clang
@bot build-clang
@bot build-clang
@bot build-tsan
fix rebase accident
missing a return statement
rebase again after a minor change in D10159
remove accidental int64_t references (I did not intend to commit those, it was me testing)
rebase on D10159
There are 2 issues here:
- You also changed the behavior when nblock = 0, with no test (and yes the RPC doc was wrong previously)
- Since you're changing the behavior of the RPC, and this feature is potentially used by miners (I can imagine switching miners using that), this needs to go through a deprecation phase first.
I think the address validation deserves a good refactor. There are validation pieces here and there, and now the functions are hard to understand at best. The fact that you have to comment about what the assumptions are at each call site is a hint.
Some examples:
- isValidxxxPrefix() returns true if there is no prefix. Cash address and token address prefix validation are now consistent, but the wrong way imo. The fact that isValidTokenPrefix("This is not an address") returns true is a bad API.
- The toLegacy() workflow is overcomplicated. You prepare a lot prefix related things before decoding the address, but the decode can fail and is tested against that. You can either rely on it, or use a complete address validation function so you get a useful error to deal with.
- Why is parseAddress() taking an isToken parameter ? I would expect this to be a return value, not an input.
put space at the end of the line, and second newline with the previous line
Make lookup unsigned, in GetNetworkHashPS, make sure it is never less than 1
OK for the refactor but please make it its own diff