-
Notifications
You must be signed in to change notification settings - Fork 4
STR-1344: rpc state cache does not get updated #142
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
STR-1344: rpc state cache does not get updated #142
Conversation
f93f4e0
to
a4b608b
Compare
a4b608b
to
34e6630
Compare
Codecov ReportAttention: Patch coverage is
@@ Coverage Diff @@
## main #142 +/- ##
==========================================
- Coverage 51.86% 51.66% -0.21%
==========================================
Files 147 147
Lines 24675 24783 +108
==========================================
+ Hits 12798 12803 +5
- Misses 11877 11980 +103
... and 5 files with indirect coverage changes 🚀 New features to boost your workflow:
|
3d66aca
to
1d2c332
Compare
1d2c332
to
b6a45a4
Compare
|
||
let mut cache_lock = cached_contracts.write().await; | ||
*cache_lock = refreshed_contracts; | ||
// drop the lock! |
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.
don't leave redundant comments lol
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.
redundant!? You don't know how many times I've got burned by a lock? At Alpen I think I've seen at least 2 times. I'm gonna die in this hill, this is not redundant. I'll remove the comment once we have STM-ish lock-free data structures in the Bridge 😄
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.
no what I mean is that the comment provides no additional value over just dropping the lock
Description
Turns out that the RPC server was trying to deserialize the
MachineState
asContractState
. That would never had worked.Type of Change
Notes to Reviewers
The duty tracker serializes all the contracts:
Checklist
Related Issues
STR-1344