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

fix: issue with decoding None block hashes #1007

Merged

Conversation

antazoey
Copy link
Contributor

What I did

Regression from cache PR where could not decode pending blocks in ape-hardhat

How I did it

Handle when hash is None in data when decoding block

How to verify it

Launch hardhat console

ape console --network ethereum:local:hardhat

Get pending block

networks.provider.get_block("pending")

It should work

Checklist

  • All changes are completed
  • New test cases have been added
  • Documentation has been updated

@antazoey antazoey changed the title fix: issue with decoding none block hashes fix: issue with decoding None block hashes Aug 19, 2022
@@ -272,7 +272,7 @@ def decode_receipt(self, data: dict) -> ReceiptAPI:
return receipt

def decode_block(self, data: Dict) -> BlockAPI:
Copy link
Contributor

Choose a reason for hiding this comment

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

Good find! Works for me!

@antazoey antazoey merged commit 4020db3 into ApeWorX:main Aug 19, 2022
@antazoey antazoey deleted the fix/jules/fix-issue-with-pending-block branch August 19, 2022 19:09
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

2 participants