-
Notifications
You must be signed in to change notification settings - Fork 335
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Coin uses shorter format for Debug #1704
Conversation
I think it would be good to use a different format for the debug view. For example, if the denom is empty, this would just output a number. Also, I think it would be nice to keep the type in there, such that the debug output of the |
|
0277e27
to
52ccdad
Compare
I made the suggested changes and rebased on main |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice change! Compact and still contains the type for a good debugging experience
Backported and shipped as part of 1.2.7 (#1719) |
The Display is now like
123ucosm
while Debug is likeCoin { denom: "ucosm", amount: Uint128(123) }]
(See example here: #1257).This is quite annoying when outputing Debug for larger structs that include
Vec<Coin>
. Now the binary fields are well-encoded, this is the ugliest part of debugging view.This will just align the Debug view with the Display view (as this seems like the canonical encoding format as per #1684)
Update: We agreed on
Coin { 123 "ucosm" }
as a more correct, yet still compact, encoding