mirror of
https://github.com/alexgo-io/bitcoin-indexer.git
synced 2026-01-12 16:52:57 +08:00
fix: deployer predicate wildcard
This commit is contained in:
@@ -159,12 +159,16 @@ pub async fn scan_stacks_chain_with_predicate(
|
||||
rollback: vec![],
|
||||
};
|
||||
match handle_stacks_hook_action(trigger, &proofs, &ctx) {
|
||||
Err(_e) => {}
|
||||
Err(e) => {
|
||||
error!(ctx.expect_logger(), "unable to handle action {}", e);
|
||||
}
|
||||
Ok(StacksChainhookOccurrence::Http(request)) => {
|
||||
send_request(request, &ctx).await;
|
||||
}
|
||||
Ok(StacksChainhookOccurrence::File(path, bytes)) => file_append(path, bytes, &ctx),
|
||||
Ok(StacksChainhookOccurrence::Data(_payload)) => {}
|
||||
Ok(StacksChainhookOccurrence::File(path, bytes)) => {
|
||||
file_append(path, bytes, &ctx);
|
||||
}
|
||||
Ok(StacksChainhookOccurrence::Data(_payload)) => unreachable!(),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -267,9 +267,15 @@ pub fn evaluate_stacks_predicate_on_transaction<'a>(
|
||||
StacksPredicate::ContractDeployment(StacksContractDeploymentPredicate::Deployer(
|
||||
expected_deployer,
|
||||
)) => match &transaction.metadata.kind {
|
||||
StacksTransactionKind::ContractDeployment(actual_deployment) => actual_deployment
|
||||
.contract_identifier
|
||||
.starts_with(expected_deployer),
|
||||
StacksTransactionKind::ContractDeployment(actual_deployment) => {
|
||||
if expected_deployer.eq("*") {
|
||||
true
|
||||
} else {
|
||||
actual_deployment
|
||||
.contract_identifier
|
||||
.starts_with(expected_deployer)
|
||||
}
|
||||
}
|
||||
_ => false,
|
||||
},
|
||||
StacksPredicate::ContractDeployment(StacksContractDeploymentPredicate::ImplementSip09) => {
|
||||
|
||||
Reference in New Issue
Block a user