diff --git a/packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_core_info/mod.rs b/packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_core_info/mod.rs
index 1196d4ebe92..ea7aafc1eb0 100644
--- a/packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_core_info/mod.rs
+++ b/packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_core_info/mod.rs
@@ -25,7 +25,7 @@ where
/// * block_platform_state - A mutable reference to the current platform state in the block
/// execution context to be updated.
/// * core_block_height - The current block height in the Dash Core.
- /// * is_init_chain - A boolean indicating if the chain is being initialized.
+ /// * start_from_scratch - A boolean indicating if we should start from scratch (eg. the chain is being initialized).
/// * block_info - A reference to the block information.
/// * transaction - The current groveDB transaction.
///
@@ -39,7 +39,7 @@ where
platform_state: Option<&PlatformState>,
block_platform_state: &mut PlatformState,
core_block_height: u32,
- is_init_chain: bool,
+ start_from_scratch: bool,
block_info: &BlockInfo,
transaction: &Transaction,
platform_version: &PlatformVersion,
@@ -54,7 +54,7 @@ where
platform_state,
block_platform_state,
core_block_height,
- is_init_chain,
+ start_from_scratch,
block_info,
transaction,
platform_version,
diff --git a/packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_core_info/v0/mod.rs b/packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_core_info/v0/mod.rs
index eb825d9ca8a..3ea15791e27 100644
--- a/packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_core_info/v0/mod.rs
+++ b/packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_core_info/v0/mod.rs
@@ -23,7 +23,7 @@ where
/// * block_platform_state - A mutable reference to the current platform state in the block
/// execution context to be updated.
/// * core_block_height - The current block height in the Dash Core.
- /// * is_init_chain - A boolean indicating if the chain is being initialized.
+ /// * start_from_scratch - A boolean indicating if the chain is being initialized.
/// * block_info - A reference to the block information.
/// * transaction - The current groveDB transaction.
///
@@ -38,13 +38,14 @@ where
platform_state: Option<&PlatformState>,
block_platform_state: &mut PlatformState,
core_block_height: u32,
- is_init_chain: bool,
+ start_from_scratch: bool,
block_info: &BlockInfo,
transaction: &Transaction,
platform_version: &PlatformVersion,
) -> Result<(), Error> {
// the core height of the block platform state is the last committed
- if !is_init_chain && block_platform_state.last_committed_core_height() == core_block_height
+ if !start_from_scratch
+ && block_platform_state.last_committed_core_height() == core_block_height
{
// if we get the same height that we know we do not need to update core info
return Ok(());
@@ -53,7 +54,7 @@ where
platform_state,
block_platform_state,
core_block_height,
- is_init_chain,
+ start_from_scratch,
block_info,
transaction,
platform_version,
@@ -63,7 +64,7 @@ where
platform_state,
block_platform_state,
core_block_height,
- false,
+ start_from_scratch,
platform_version,
)
}
diff --git a/packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_list/mod.rs b/packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_list/mod.rs
index f0de44e4709..b78400c8948 100644
--- a/packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_list/mod.rs
+++ b/packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_list/mod.rs
@@ -40,7 +40,7 @@ where
platform_state: Option<&PlatformState>,
block_platform_state: &mut PlatformState,
core_block_height: u32,
- is_init_chain: bool,
+ start_from_scratch: bool,
block_info: &BlockInfo,
transaction: &Transaction,
platform_version: &PlatformVersion,
@@ -55,7 +55,7 @@ where
platform_state,
block_platform_state,
core_block_height,
- is_init_chain,
+ start_from_scratch,
block_info,
transaction,
platform_version,
diff --git a/packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_list/v0/mod.rs b/packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_list/v0/mod.rs
index 568a91b0b0b..b24590b69b4 100644
--- a/packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_list/v0/mod.rs
+++ b/packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_list/v0/mod.rs
@@ -36,7 +36,7 @@ where
platform_state: Option<&PlatformState>,
block_platform_state: &mut PlatformState,
core_block_height: u32,
- is_init_chain: bool,
+ start_from_scratch: bool,
block_info: &BlockInfo,
transaction: &Transaction,
platform_version: &PlatformVersion,
@@ -44,7 +44,9 @@ where
if let Some(last_committed_block_info) =
block_platform_state.last_committed_block_info().as_ref()
{
- if core_block_height == last_committed_block_info.basic_info().core_height {
+ if !start_from_scratch
+ && core_block_height == last_committed_block_info.basic_info().core_height
+ {
tracing::debug!(
method = "update_masternode_list_v0",
"no update mnl at height {}",
@@ -66,7 +68,7 @@ where
} = self.update_state_masternode_list_v0(
block_platform_state,
core_block_height,
- is_init_chain,
+ start_from_scratch,
)?;
self.update_masternode_identities(