mirror of
https://github.com/alexgo-io/bitcoin-indexer.git
synced 2026-06-16 18:19:17 +08:00
fix: chain mixup, add logs
This commit is contained in:
@@ -181,13 +181,13 @@ impl ChainhookSpecification {
|
||||
|
||||
pub fn into_serialized_json(&self) -> JsonValue {
|
||||
match &self {
|
||||
Self::Bitcoin(data) => json!({
|
||||
Self::Stacks(data) => json!({
|
||||
"chain": "stacks",
|
||||
"uuid": data.uuid,
|
||||
"network": data.network,
|
||||
"predicate": data.predicate,
|
||||
}),
|
||||
Self::Stacks(data) => json!({
|
||||
Self::Bitcoin(data) => json!({
|
||||
"chain": "bitcoin",
|
||||
"uuid": data.uuid,
|
||||
"network": data.network,
|
||||
|
||||
@@ -1208,12 +1208,12 @@ pub async fn start_observer_commands_handler(
|
||||
if let Some(ref tx) = observer_events_tx {
|
||||
let _ = tx.send(ObserverEvent::PredicateRegistered(spec));
|
||||
} else {
|
||||
ctx.try_log(|logger| slog::info!(logger, "Enabling Predicate"));
|
||||
ctx.try_log(|logger| slog::info!(logger, "Enabling Predicate {}", spec.uuid()));
|
||||
chainhook_store.predicates.enable_specification(&mut spec);
|
||||
}
|
||||
}
|
||||
ObserverCommand::EnablePredicate(mut spec) => {
|
||||
ctx.try_log(|logger| slog::info!(logger, "Enabling Predicate"));
|
||||
ctx.try_log(|logger| slog::info!(logger, "Enabling Predicate {}", spec.uuid()));
|
||||
chainhook_store.predicates.enable_specification(&mut spec);
|
||||
if let Some(ref tx) = observer_events_tx {
|
||||
let _ = tx.send(ObserverEvent::PredicateEnabled(spec));
|
||||
|
||||
Reference in New Issue
Block a user