mirror of
https://github.com/logos-blockchain/lssa.git
synced 2026-02-18 20:33:13 +00:00
fix: fmt
This commit is contained in:
parent
ae00d62b98
commit
cdd44b7ae6
@ -83,9 +83,7 @@ impl BedrockClient {
|
||||
.await
|
||||
}
|
||||
|
||||
pub async fn get_consensus_info(
|
||||
&self,
|
||||
) -> Result<CryptarchiaInfo, Error> {
|
||||
pub async fn get_consensus_info(&self) -> Result<CryptarchiaInfo, Error> {
|
||||
Retry::spawn(self.backoff_strategy(), || {
|
||||
self.http_client
|
||||
.consensus_info(self.node_url.clone())
|
||||
|
||||
@ -162,14 +162,14 @@ impl IndexerCore {
|
||||
|
||||
async fn get_next_tip(&self, prev_tip: HeaderId) -> Result<HeaderId> {
|
||||
loop {
|
||||
let next_tip = self.get_tip().await?;
|
||||
if next_tip != prev_tip {
|
||||
break Ok(next_tip);
|
||||
} else {
|
||||
info!("Wait 10s to not spam the node");
|
||||
tokio::time::sleep(std::time::Duration::from_secs(10)).await;
|
||||
}
|
||||
let next_tip = self.get_tip().await?;
|
||||
if next_tip != prev_tip {
|
||||
break Ok(next_tip);
|
||||
} else {
|
||||
info!("Wait 10s to not spam the node");
|
||||
tokio::time::sleep(std::time::Duration::from_secs(10)).await;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// WARNING: depending on chain behaviour,
|
||||
@ -191,19 +191,25 @@ impl IndexerCore {
|
||||
let mut cycle_header = curr_last_header;
|
||||
|
||||
loop {
|
||||
let curr_last_block = if let Some(block) = self
|
||||
.bedrock_client
|
||||
.get_block_by_id(cycle_header)
|
||||
.await?
|
||||
{
|
||||
block
|
||||
} else {
|
||||
break;
|
||||
};
|
||||
let curr_last_block =
|
||||
if let Some(block) = self.bedrock_client.get_block_by_id(cycle_header).await? {
|
||||
block
|
||||
} else {
|
||||
break;
|
||||
};
|
||||
|
||||
info!("INITIAL_SEARCH: Observed L1 block at slot {}", curr_last_block.header().slot().into_inner());
|
||||
info!("INITIAL_SEARCH: This block header is {}", curr_last_block.header().id());
|
||||
info!("INITIAL_SEARCH: This block parent is {}", curr_last_block.header().parent());
|
||||
info!(
|
||||
"INITIAL_SEARCH: Observed L1 block at slot {}",
|
||||
curr_last_block.header().slot().into_inner()
|
||||
);
|
||||
info!(
|
||||
"INITIAL_SEARCH: This block header is {}",
|
||||
curr_last_block.header().id()
|
||||
);
|
||||
info!(
|
||||
"INITIAL_SEARCH: This block parent is {}",
|
||||
curr_last_block.header().parent()
|
||||
);
|
||||
|
||||
block_buffer.push_front(curr_last_block.clone());
|
||||
|
||||
@ -256,7 +262,7 @@ impl IndexerCore {
|
||||
curr_last_header = loop {
|
||||
let next_tip = self.get_tip().await?;
|
||||
if next_tip != curr_last_header {
|
||||
break next_tip;
|
||||
break next_tip;
|
||||
} else {
|
||||
info!("Wait 10s to not spam the node");
|
||||
tokio::time::sleep(std::time::Duration::from_secs(10)).await;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user