#310 refactor maintenance block #678

Merged
vampik merged 31 commits from feature/310-refactor-maintenance-block into feature/son-for-hive-voting 2022-04-12 17:11:22 +00:00
Showing only changes of commit 7a41307712 - Show all commits

View file

@ -457,7 +457,8 @@ void peerplays_sidechain_plugin_impl::schedule_son_processing() {
void peerplays_sidechain_plugin_impl::son_processing() {
//! Fixme - here we must check size for every sidechain
if (plugin.database().get_global_properties().active_sons.size() <= 0) {
if (plugin.database().get_global_properties().active_sons.at(sidechain_type::bitcoin).size() <= 0 &&
plugin.database().get_global_properties().active_sons.at(sidechain_type::hive).size() <= 0) {
return;
}
@ -483,7 +484,7 @@ void peerplays_sidechain_plugin_impl::son_processing() {
// for the test prove that in hive scheduled son is active son
chain::son_id_type scheduled_bitcoin_son_id = plugin.database().get_scheduled_son(sidechain_type::bitcoin ,1);
ilog("Scheduled SON[!HIVE!]: ${scheduled_bitcoin_son_id} Now: ${now} ",
ilog("Scheduled SON[!BITCOIN!]: ${scheduled_bitcoin_son_id} Now: ${now} ",
("scheduled_bitcoin_son_id", scheduled_bitcoin_son_id)("now", now));
for (son_id_type son_id : plugin.get_sons()) {