From 95dcc4bf0847c8a1dc642ff8fdf7cf2b444c0e52 Mon Sep 17 00:00:00 2001 From: Kevin Heifner Date: Wed, 27 Nov 2024 10:14:37 -0600 Subject: [PATCH] GH-1039 Start production after net_plugin is started to allow for new blocks to flow in from the network --- plugins/producer_plugin/producer_plugin.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/producer_plugin/producer_plugin.cpp b/plugins/producer_plugin/producer_plugin.cpp index cba3f19915..d41d3e494c 100644 --- a/plugins/producer_plugin/producer_plugin.cpp +++ b/plugins/producer_plugin/producer_plugin.cpp @@ -1633,7 +1633,10 @@ void producer_plugin_impl::plugin_startup() { app().quit(); } ); - schedule_production_loop(); + // start production after net_plugin has started in case there are poison blocks in the fork database + app().executor().post(priority::high, exec_queue::read_write, [this]() { + schedule_production_loop(); + }); dlog("producer plugin: plugin_startup() end"); }