File tree 2 files changed +4
-0
lines changed
libraries/plugins/witness
2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -84,6 +84,7 @@ class witness_plugin : public graphene::app::plugin {
84
84
85
85
boost::program_options::variables_map _options;
86
86
bool _production_enabled = false ;
87
+ bool _shutting_down = false ;
87
88
uint32_t _required_witness_participation = 33 * GRAPHENE_1_PERCENT;
88
89
uint32_t _production_skip_flags = graphene::chain::database::skip_nothing;
89
90
Original file line number Diff line number Diff line change @@ -144,6 +144,7 @@ void witness_plugin::plugin_startup()
144
144
void witness_plugin::plugin_shutdown ()
145
145
{
146
146
// nothing to do
147
+ _shutting_down = true ;
147
148
}
148
149
149
150
void witness_plugin::refresh_witness_key_cache ()
@@ -161,6 +162,8 @@ void witness_plugin::refresh_witness_key_cache()
161
162
162
163
void witness_plugin::schedule_production_loop ()
163
164
{
165
+ if (_shutting_down) return ;
166
+
164
167
// Schedule for the next second's tick regardless of chain state
165
168
// If we would wait less than 50ms, wait for the whole second.
166
169
fc::time_point now = fc::time_point::now ();
You can’t perform that action at this time.
0 commit comments