-
Notifications
You must be signed in to change notification settings - Fork 2
Implemented block inactivity timeout #441
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
Conversation
Deploying happychain with
|
| Latest commit: |
b6c5dd3
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://91f22b7b.happychain.pages.dev |
| Branch Preview URL: | https://gabriel-retry-rpc-conexion.happychain.pages.dev |
packages/txm/lib/BlockMonitor.ts
Outdated
|
|
||
| private scheduleTimeout() { | ||
| this.blockTimeout = setTimeout(() => { | ||
| console.log("Timeout reached. Resetting watch.") |
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.
| console.log("Timeout reached. Resetting watch.") | |
| console.log("Timeout reached. Resetting block subscription.") |
packages/txm/lib/BlockMonitor.ts
Outdated
| }, this.txmgr.blockInactivityTimeout) | ||
| } | ||
|
|
||
| private resetWatch() { |
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.
| private resetWatch() { | |
| private resetBlockSubscription() { |
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.
Let's use the new logger.
52b0968 to
23723dd
Compare
53e6363 to
45ac09c
Compare
4f3b431 to
dabb31d
Compare
ac06da7 to
b9d5ea6
Compare
b9d5ea6 to
aceb0e0
Compare
0af1a20 to
b6c5dd3
Compare

Description
This PR aims to solve a problem we encountered in production, where after a few hours of operation, the randomness stops working because the RPC stops sending blocks without throwing an error.
Toggle Checklist
Checklist
Basics
norswap/build-system-caching).Reminder: PR review guidelines
Correctness
testnet, mainnet, standalone wallet, ...).
< INDICATE BROWSER, DEMO APP & OTHER ENV DETAILS USED FOR TESTING HERE >
< INDICATE TESTED SCENARIOS (USER INTERFACE INTERACTION, CODE FLOWS) HERE >
and have updated the code & comments accordingly.
Architecture & Documentation
(2) commenting these boundaries correctly, (3) adding inline comments for context when needed.
comments.
in a Markdown document.
pacakges/coreandpackages/react), see here for more info.