-
Notifications
You must be signed in to change notification settings - Fork 453
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
Algod: Better Box Reference Error Message #5325
Merged
Merged
Conversation
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
ahangsu
changed the title
Enhancement: Better Box Reference Error Message
Algod: Better Box Reference Error Message
Apr 21, 2023
ahangsu
force-pushed
the
better-box-key-error
branch
from
April 21, 2023 16:02
9031d54
to
4d37eff
Compare
jannotti
reviewed
Apr 21, 2023
ledger/eval/applications.go
Outdated
@@ -229,7 +229,7 @@ func (cs *roundCowState) NewBox(appIdx basics.AppIndex, key string, value []byte | |||
return err | |||
} | |||
if exists { | |||
return fmt.Errorf("attempt to recreate %s", key) | |||
return fmt.Errorf("attempt to recreate %#x", key) |
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.
While we're in here, let's add the word "box" after "recreate" to match the wording elsewhere.
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.
yep, will do
ahangsu
force-pushed
the
better-box-key-error
branch
from
April 21, 2023 16:28
23ea5b5
to
228176a
Compare
bbroder-algo
approved these changes
Apr 21, 2023
jannotti
approved these changes
Apr 21, 2023
jannotti
added a commit
to jannotti/go-algorand
that referenced
this pull request
Apr 24, 2023
This was referenced May 9, 2023
This was referenced May 24, 2023
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
See issue #5229, the box key representation is essentially a byte slice wrapped under
string
. This representation does not necessarily fall under ASCII symbol set, and printing with%v
or%#v
will be hard to decode and debug.We decide to print with hex, i.e.,
%#x
format.Test Plan