Skip to content

Commit

Permalink
fix: re-wire cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
lgalabru committed Aug 5, 2023
1 parent 2a0e75f commit a1447ad
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
7 changes: 6 additions & 1 deletion components/hord-cli/src/cli/mod.rs
Expand Up @@ -638,7 +638,12 @@ async fn handle_command(opts: Opts, ctx: &Context) -> Result<(), String> {
let config = Config::default(false, false, false, &cmd.config_path)?;
initialize_hord_db(&config.expected_cache_path(), &ctx);
},
Command::Db(HordDbCommand::Sync(_cmd)) => unimplemented!(),
Command::Db(HordDbCommand::Sync(cmd)) => {
let config = Config::default(false, false, false, &cmd.config_path)?;
initialize_hord_db(&config.expected_cache_path(), &ctx);
let service = Service::new(config, ctx.clone());
service.update_state(None).await?;
},
Command::Db(HordDbCommand::Repair(subcmd)) => match subcmd {
RepairCommand::Blocks(cmd) => {
let config = Config::default(false, false, false, &cmd.config_path)?;
Expand Down
Expand Up @@ -530,7 +530,8 @@ pub fn augment_transaction_with_ordinals_inscriptions_data(
}
};

// Do we need to curse the inscription because of re-inscription?
// Do we need to curse the inscription?
let mut inscription_number = sequence_cursor.pick_next(is_cursed, block_identifier.index);
let mut curse_type_override = None;
if !is_cursed {
// Is this inscription re-inscribing an existing blessed inscription?
Expand All @@ -553,8 +554,6 @@ pub fn augment_transaction_with_ordinals_inscriptions_data(
}
};

let mut inscription_number = sequence_cursor.pick_next(is_cursed, block_identifier.index);

let outputs = &tx.metadata.outputs;
inscription.inscription_number = inscription_number;
inscription.ordinal_offset = traversal.get_ordinal_coinbase_offset();
Expand Down

0 comments on commit a1447ad

Please sign in to comment.