Skip to content
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

clique: fix block number unmarshal #23961

Merged
merged 2 commits into from Nov 24, 2021
Merged

Conversation

s1na
Copy link
Contributor

@s1na s1na commented Nov 23, 2021

Doing clique.getSigner('00ff') (hex string without 0x) in the console caused a crash

@s1na s1na requested a review from karalabe as a code owner November 23, 2021 18:10
@@ -196,7 +196,11 @@ func (sb *blockNumberOrHashOrRLP) UnmarshalJSON(data []byte) error {
if err := json.Unmarshal(data, &input); err != nil {
return err
}
sb.RLP = hexutil.MustDecode(input)
unhexed, err := hexutil.Decode(input)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please call it blob :) We use it throughout the code when referring to a decoded binary... blob :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. Missed opportunity to call it bob :)

Copy link
Contributor

@holiman holiman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@holiman holiman added this to the 1.10.14 milestone Nov 24, 2021
@holiman holiman merged commit 66ee942 into ethereum:master Nov 24, 2021
@s1na s1na deleted the fix/getsigner-crasher branch November 24, 2021 14:51
sidhujag pushed a commit to syscoin/go-ethereum that referenced this pull request Nov 24, 2021
* clique: fix block number unmarshal

* clique: rename
JacekGlen pushed a commit to JacekGlen/go-ethereum that referenced this pull request May 26, 2022
* clique: fix block number unmarshal

* clique: rename
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants