-
-
Notifications
You must be signed in to change notification settings - Fork 150
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: contract_type cache corruption #2540
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clean fix, thank you
I'd like a test for this before calling it good, but I am happy to write such test. |
address, contract_type=contract_type | ||
) | ||
# Store contract_type in cache only if missing | ||
if (contract := self.chain_manager.contracts.instance_at(address)) is None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think instance_at()
returns None
, you probably want .get_contract_type()
here.
if (contract := self.chain_manager.contracts.instance_at(address)) is None: | |
if (contract_type := self.chain_manager.contracts.get_contract_type(address)) is None: |
If you have a test in mind, please do! I am traveling today but can get back to the workstation to pick up this (and other) changes on Monday morning. |
Fixes #2539