-
Notifications
You must be signed in to change notification settings - Fork 668
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
Enables hot reloading of mining configuration file #3385
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #3385 +/- ##
===========================================
- Coverage 32.35% 30.69% -1.66%
===========================================
Files 262 262
Lines 212722 212884 +162
===========================================
- Hits 68816 65348 -3468
- Misses 143906 147536 +3630
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Can you run stacks-node with a mock miner configuration to test the config reloading? |
Sure, do you want me to write an integration test or just run it by hand and check? |
Integration test would be sweet! |
testnet/stacks-node/src/config.rs
Outdated
|
||
#[derive(Clone, Debug)] | ||
pub struct ConfigLoaderHandle { | ||
handle: std::sync::Arc<std::sync::Mutex<RefCell<ConfigLoader>>>, |
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.
You probably don't need (or want) RefCell
here.
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.
RefCell removed from ConfigHandle
and ConfigLoaderHandle
.
On the whole, it's not clear to me why there needs to be a shared |
…requency when starting a microblock miner thread
1ea6352
to
e3a869c
Compare
Closing for now, might resume progress in future. |
Enables hot reloading of mining configuration file.
Prior to every mining burnchain transaction, the config file will be reloaded if its modified time is newer and the following settings will be reloaded:
The following config file items, if missing, will be read from environment variables:
Addresses the following issues: