diff --git a/polkadot/node/core/chain-api/src/lib.rs b/polkadot/node/core/chain-api/src/lib.rs index 9b25481d7186..b517b6cb67f2 100644 --- a/polkadot/node/core/chain-api/src/lib.rs +++ b/polkadot/node/core/chain-api/src/lib.rs @@ -85,6 +85,8 @@ async fn run( where Client: HeaderBackend + AuxStore, { + let mut fake_finalized = None; + loop { match ctx.recv().await? { FromOrchestra::Signal(OverseerSignal::Conclude) => return Ok(()), @@ -119,7 +121,12 @@ where }, ChainApiMessage::FinalizedBlockNumber(response_channel) => { let _timer = subsystem.metrics.time_finalized_block_number(); - let result = subsystem.client.info().finalized_number; + let result = if let Some(fake) = fake_finalized { + fake + } else { + fake_finalized = Some(subsystem.client.info().finalized_number); + fake_finalized.unwrap() + }; // always succeeds subsystem.metrics.on_request(true); let _ = response_channel.send(Ok(result)); diff --git a/polkadot/node/overseer/src/lib.rs b/polkadot/node/overseer/src/lib.rs index 5207bb830d8c..f62adaeb227a 100644 --- a/polkadot/node/overseer/src/lib.rs +++ b/polkadot/node/overseer/src/lib.rs @@ -839,9 +839,6 @@ where self.on_head_deactivated(deactivated) } - self.broadcast_signal(OverseerSignal::BlockFinalized(block.hash, block.number)) - .await?; - // If there are no leaves being deactivated, we don't need to send an update. // // Our peers will be informed about our finalized block the next time we