From 93c460d7a1456ea838766079346fa4130133821f Mon Sep 17 00:00:00 2001 From: Mr-Leshiy Date: Sun, 7 Apr 2024 15:48:59 +0300 Subject: [PATCH] cleanup --- catalyst-gateway/bin/src/follower.rs | 10 +++------- catalyst-gateway/tests/api_tests/Earthfile | 4 ++-- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/catalyst-gateway/bin/src/follower.rs b/catalyst-gateway/bin/src/follower.rs index 7c6f1b4b16..4f88355d4e 100644 --- a/catalyst-gateway/bin/src/follower.rs +++ b/catalyst-gateway/bin/src/follower.rs @@ -10,7 +10,7 @@ use cardano_chain_follower::{ }; use chrono::TimeZone; use tokio::{task::JoinHandle, time}; -use tracing::{error, info, warn}; +use tracing::{error, info}; use crate::{ event_db::{ @@ -207,7 +207,6 @@ async fn init_follower( continue; }, }; - warn!("Block hash: {}", block.hash()); let wallclock = match block.wallclock(&genesis_values).try_into() { Ok(time) => chrono::Utc.timestamp_nanos(time), @@ -224,7 +223,7 @@ async fn init_follower( continue; }, }; - warn!("Start index follower data..."); + match db .index_follower_data( slot, @@ -243,7 +242,6 @@ async fn init_follower( } // index utxo - warn!("Start index utxo data..."); match db.index_utxo_data(block.txs(), slot, network).await { Ok(()) => (), Err(err) => { @@ -254,8 +252,7 @@ async fn init_follower( // Block processing for Eras before staking are ignored. if valid_era(block.era()) { - // Registration - warn!("Start index registration data..."); + // index catalyst registrations // match db.index_registration_data(block.txs(), slot, // network).await { Ok(()) => (), // Err(err) => { @@ -271,7 +268,6 @@ async fn init_follower( } // Refresh update metadata for future followers - warn!("Refresh last updated..."); match db .refresh_last_updated( chrono::offset::Utc::now(), diff --git a/catalyst-gateway/tests/api_tests/Earthfile b/catalyst-gateway/tests/api_tests/Earthfile index bf384a1513..8c41bc87f1 100644 --- a/catalyst-gateway/tests/api_tests/Earthfile +++ b/catalyst-gateway/tests/api_tests/Earthfile @@ -11,7 +11,7 @@ builder: cat-gateway-test: ARG DB_URL="postgres://catalyst-event-dev:CHANGE_ME@event-db/CatalystEventDev" ARG CAT_ADDRESS="0.0.0.0:3030" - ARG LOG_LEVEL="warn" + ARG LOG_LEVEL="error" FROM ../../+package-cat-gateway --address=$CAT_ADDRESS --db_url=$DB_URL --log_level=$LOG_LEVEL @@ -31,5 +31,5 @@ test: --load cat-gateway-test:latest=(+cat-gateway-test) \ --service cat-gateway \ --allow-privileged - RUN poetry run pytest api_tests/test_utxo.py -s + RUN poetry run pytest -s END