Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

Serialize eth_feeHistory block count as QUANTITY #668

Merged
merged 2 commits into from
Dec 10, 2021
Merged

Serialize eth_feeHistory block count as QUANTITY #668

merged 2 commits into from
Dec 10, 2021

Conversation

nlordell
Copy link
Contributor

Motivation

Retrieving fee history with, say, a u64 would serialize the the block_count as a number twice, instead of first trying as a QUANTITY which is my understanding of what it is meant to do (i.e. hex-encoded string - e.g. 0x42). This PR aims to fix that.

Solution

Instead of serializing the block_count that is passed in, it first converts to a U256 (which serializes as a QUANTITY).

PR Checklist

  • Added Tests (No - but should be covered by existing tests?)
  • Added Documentation (No - behaviour shouldn't have been changed)
  • Updated the changelog

@gakonst gakonst merged commit 7bd42be into gakonst:master Dec 10, 2021
Copy link
Owner

@gakonst gakonst left a comment

Choose a reason for hiding this comment

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

Good catch!

@nlordell
Copy link
Contributor Author

There was an issue!

@nlordell nlordell mentioned this pull request Dec 10, 2021
3 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants