-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: ignore iris strange trace (#127)
insert balances fails because the amount field has non-UTF-8 characters. This is due to a strange iris trace that is interpreted as bank balance trace with a value `\n$\n\x05uiris\x12\x1b509625143506063788050678455`. When this value is unmarshaled into a `sdk.Coin`, it doesn't trigger any error but fills the `sdk.Coin.Amount` field with invalid UTF-8 characters, leading to the database error mentioned earlier. Actually, this iris trace is not a balance bank trace, because the format of the key is `0x02+len(addr)+addr`, whereas the balance key format is `0x02+len(addr)+addr+denom`. So, despite we didn't manage to find the module corresponding to this trace, what appears to be the best fix is to ensure the bank processor ignores this trace. - This commit adds tests to the existing code: edef1fc - This commit ensures the bank processor ignores traces like the one of Iris: 8c0c7df
- Loading branch information
Showing
3 changed files
with
100 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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