Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr-Leshiy committed Apr 7, 2024
1 parent bb4a598 commit 93c460d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
10 changes: 3 additions & 7 deletions catalyst-gateway/bin/src/follower.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::{
Expand Down Expand Up @@ -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),
Expand All @@ -224,7 +223,7 @@ async fn init_follower(
continue;
},
};
warn!("Start index follower data...");

match db
.index_follower_data(
slot,
Expand All @@ -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) => {
Expand All @@ -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) => {
Expand All @@ -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(),
Expand Down
4 changes: 2 additions & 2 deletions catalyst-gateway/tests/api_tests/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

0 comments on commit 93c460d

Please sign in to comment.