-
Notifications
You must be signed in to change notification settings - Fork 20.4k
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
SyncProgress() fails unmarshalling in Geth v1.10.14 #24180
Labels
Comments
This was referenced Jan 3, 2022
This was referenced Jan 3, 2022
fjl
added a commit
that referenced
this issue
Jan 5, 2022
SyncProgress was modified in PR #23576 to add the fields reported for snap sync. The PR also changed ethclient to use the SyncProgress struct directly instead of wrapping it for hex-decoding. This broke the SyncProgress method. Fix it by putting back the custom wrapper. While here, also put back the fast sync related fields because SyncProgress is stable API and thus removing fields is not allowed. Fixes #24180 Fixes #24176
sidhujag
pushed a commit
to syscoin/go-ethereum
that referenced
this issue
Jan 6, 2022
SyncProgress was modified in PR ethereum#23576 to add the fields reported for snap sync. The PR also changed ethclient to use the SyncProgress struct directly instead of wrapping it for hex-decoding. This broke the SyncProgress method. Fix it by putting back the custom wrapper. While here, also put back the fast sync related fields because SyncProgress is stable API and thus removing fields is not allowed. Fixes ethereum#24180 Fixes ethereum#24176
JacekGlen
pushed a commit
to JacekGlen/go-ethereum
that referenced
this issue
May 26, 2022
SyncProgress was modified in PR ethereum#23576 to add the fields reported for snap sync. The PR also changed ethclient to use the SyncProgress struct directly instead of wrapping it for hex-decoding. This broke the SyncProgress method. Fix it by putting back the custom wrapper. While here, also put back the fast sync related fields because SyncProgress is stable API and thus removing fields is not allowed. Fixes ethereum#24180 Fixes ethereum#24176
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
System information
Geth version:
OS & Version: Linux x64 and ARM64
Expected behaviour
ethclient.Client.SyncProgress(context.Background())
should return a pointer to a populatedethereum.SyncProgress
object.Actual behaviour
The function returns the following error:
json: cannot unmarshal string into Go struct field SyncProgress.CurrentBlock of type uint64
This may be the same problem as #24176, though this report is for the current release (v1.10.14) and is part of the library itself regardless of mobile / desktop platform.
This was likely caused by the changes to
ethclient/ethclient.go
's unmarshaling code in #23576:https://github.com/ethereum/go-ethereum/pull/23576/files#diff-1053ae80885a491cefa0ab360c605e7abbcec41fbb620c070a132c58a3bd6cac
Steps to reproduce the behaviour
Sample code:
Output when importing
github.com/ethereum/[email protected]
:Output when importing
github.com/ethereum/[email protected]
:The text was updated successfully, but these errors were encountered: