fix: revisit transfer loop

This commit is contained in:
Ludo Galabru
2023-08-28 17:15:08 -04:00
parent 4920e86525
commit 1f2151c098
2 changed files with 11 additions and 10 deletions

View File

@@ -734,9 +734,16 @@ async fn handle_command(opts: Opts, ctx: &Context) -> Result<(), String> {
};
let service = Service::new(config, ctx.clone());
let blocks = cmd.get_blocks();
service
.replay_transfers(blocks, block_post_processor)
.await?;
info!(
ctx.expect_logger(),
"Re-indexing transfers for {} blocks",
blocks.len()
);
for block in blocks.into_iter() {
service
.replay_transfers(vec![block], block_post_processor.clone())
.await?;
}
}
},
Command::Db(OrdhookDbCommand::Check(cmd)) => {

View File

@@ -515,13 +515,7 @@ impl Service {
let blocks_post_processor =
start_transfers_recomputing_processor(&self.config, &self.ctx, block_post_processor);
info!(
self.ctx.expect_logger(),
"Re-indexing transfers for {} blocks",
blocks.len()
);
let ordhook_config = self.config.get_ordhook_config();
let ordhook_config = self.config.get_ordhook_config();
let first_inscription_height = ordhook_config.first_inscription_height;
download_and_pipeline_blocks(
&self.config,