fix(crypto): handle mainnet address exceptions#3055
Merged
faustbrian merged 9 commits intodevelopfrom Oct 13, 2019
Merged
Conversation
A handful of mainnet transactions have an invalid recipient. Due to a refactor of the Address network byte validation it is no longer trivially possible to handle them. If an invalid address is encountered during transfer serialization, the error is bubbled up to defer the `AddressNetworkByteError` until the actual id is available to call `isException`.
Codecov Report
@@ Coverage Diff @@
## develop #3055 +/- ##
===========================================
- Coverage 65.65% 65.62% -0.04%
===========================================
Files 425 425
Lines 11715 11733 +18
Branches 1593 1601 +8
===========================================
+ Hits 7692 7700 +8
- Misses 3987 3997 +10
Partials 36 36
Continue to review full report at Codecov.
|
faustbrian
approved these changes
Oct 13, 2019
vasild
added a commit
that referenced
this pull request
Oct 14, 2019
…o-from-string * ArkEcosystem/core/develop: fix(crypto): handle mainnet address exceptions (#3055)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A handful of mainnet transactions have an invalid recipient. Due to a
refactor of the address network byte validation (#3000) it is no longer
trivially possible to handle them. Now, if an invalid address is encountered
during transfer serialization, the error is bubbled up to defer the
AddressNetworkByteErroruntil the actual id is available to callisException.Also due to stricter checks the negative balance exceptions failed. Add
extra safeguard to handle them properly.
Checklist