Skip to content

Commit

Permalink
Reduce projected NFT task overhead
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastienGllmt committed Apr 28, 2024
1 parent dbba579 commit 7c6c388
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion indexer/tasks/src/config/AddressConfig.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#[derive(Debug, Clone, serde::Deserialize, serde::Serialize)]
pub struct AddressConfig {
pub address: String,
pub address: String, // hex-encoded
}
4 changes: 2 additions & 2 deletions indexer/tasks/src/multiera/multiera_projected_nft.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ carp_task! {
read [multiera_txs, multiera_outputs, multiera_used_inputs_to_outputs_map];
write [];
should_add_task |block, _properties| {
!block.1.is_empty()
!block.1.is_empty() && block.1.transaction_witness_sets().iter().any(|set| set.redeemers.is_some())
};
execute |previous_data, task| handle_projected_nft(
task.db_tx,
Expand Down Expand Up @@ -358,7 +358,7 @@ fn get_payment_cred(address: String) -> Result<cml_chain::certs::Credential, DbE
))
})?;

let config_address = cml_chain::address::Address::from_bytes(config_address)
let config_address = cml_chain::address::Address::from_raw_bytes(&config_address)
.map_err(|err| DbErr::Custom(format!("cml can't parse config address: {:?}", err)))?;
match config_address.payment_cred() {
None => Err(DbErr::Custom(
Expand Down

0 comments on commit 7c6c388

Please sign in to comment.