-
Notifications
You must be signed in to change notification settings - Fork 20.5k
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
cmd/geth: support string (non-hex) keys in db get/put/delete #23744
Conversation
It is suppose to be convinient when observing internal state, via constant keys like `SnapshotSyncStatus`, `SnapshotRecovery` etc. Otherwise it's necessary to convert these strings to hex which might be inconvinient. Signed-off-by: Maxim Zhiburt <zhiburt@gmail.com>
Great, I've been annoyed by this same thing myself! |
A couple of things:
|
Agreed
I guess it doesn't because it in such case user could provide such a key encoded in hex right after 0x.
You are right. |
Signed-off-by: Maxim Zhiburt <zhiburt@gmail.com>
Must be fixed according to your comments @holiman |
Co-authored-by: Martin Holst Swende <martin@swende.se>
Co-authored-by: Martin Holst Swende <martin@swende.se>
Signed-off-by: Maxim Zhiburt <zhiburt@gmail.com>
I pushed a fix, it works now:
|
thanks, haven't spotted that 😞 |
…m#23744) Adds suppor for passing regular strings to db `put`/`get`/`delete`, to avoid having to hex-encode when operating on fixed-key items like `SnapshotSyncStatus`, `SnapshotRecovery` etc. Signed-off-by: Maxim Zhiburt <zhiburt@gmail.com> Co-authored-by: Martin Holst Swende <martin@swende.se>
…m#23744) Adds suppor for passing regular strings to db `put`/`get`/`delete`, to avoid having to hex-encode when operating on fixed-key items like `SnapshotSyncStatus`, `SnapshotRecovery` etc. Signed-off-by: Maxim Zhiburt <zhiburt@gmail.com> Co-authored-by: Martin Holst Swende <martin@swende.se>
Hi,
This flag suppose to bring a little more convenience, when observing internal state,
via constant keys like
SnapshotSyncStatus
,SnapshotRecovery
etc.Now it's necessary to convert these strings to hex and to add a prefix
0x
which might be inconvenient.And not intuitive at a first glance.