diff --git a/Cargo.lock b/Cargo.lock index 2d63afd1..35c76544 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7542,7 +7542,7 @@ checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" [[package]] name = "subvt-app-service" -version = "0.17.36-5" +version = "0.17.36-6" dependencies = [ "actix-http", "actix-rt", @@ -7571,7 +7571,7 @@ dependencies = [ [[package]] name = "subvt-block-processor" -version = "0.17.36-5" +version = "0.17.36-6" dependencies = [ "anyhow", "async-lock", @@ -7597,7 +7597,7 @@ dependencies = [ [[package]] name = "subvt-config" -version = "0.17.36-5" +version = "0.17.36-6" dependencies = [ "config", "serde", @@ -7605,7 +7605,7 @@ dependencies = [ [[package]] name = "subvt-governance" -version = "0.17.36-5" +version = "0.17.36-6" dependencies = [ "anyhow", "lazy_static", @@ -7619,7 +7619,7 @@ dependencies = [ [[package]] name = "subvt-logging" -version = "0.17.36-5" +version = "0.17.36-6" dependencies = [ "env_logger", "log", @@ -7628,7 +7628,7 @@ dependencies = [ [[package]] name = "subvt-metrics" -version = "0.17.36-5" +version = "0.17.36-6" dependencies = [ "env_logger", "log", @@ -7642,7 +7642,7 @@ dependencies = [ [[package]] name = "subvt-network-status-server" -version = "0.17.36-5" +version = "0.17.36-6" dependencies = [ "anyhow", "async-trait", @@ -7667,7 +7667,7 @@ dependencies = [ [[package]] name = "subvt-network-status-updater" -version = "0.17.36-5" +version = "0.17.36-6" dependencies = [ "anyhow", "async-trait", @@ -7689,7 +7689,7 @@ dependencies = [ [[package]] name = "subvt-nft" -version = "0.17.36-5" +version = "0.17.36-6" dependencies = [ "anyhow", "lazy_static", @@ -7701,7 +7701,7 @@ dependencies = [ [[package]] name = "subvt-notification-generator" -version = "0.17.36-5" +version = "0.17.36-6" dependencies = [ "anyhow", "async-lock", @@ -7728,7 +7728,7 @@ dependencies = [ [[package]] name = "subvt-notification-processor" -version = "0.17.36-5" +version = "0.17.36-6" dependencies = [ "a2", "anyhow", @@ -7763,7 +7763,7 @@ dependencies = [ [[package]] name = "subvt-onekv-updater" -version = "0.17.36-5" +version = "0.17.36-6" dependencies = [ "anyhow", "async-trait", @@ -7785,7 +7785,7 @@ dependencies = [ [[package]] name = "subvt-persistence" -version = "0.17.36-5" +version = "0.17.36-6" dependencies = [ "anyhow", "chrono", @@ -7804,7 +7804,7 @@ dependencies = [ [[package]] name = "subvt-plotter" -version = "0.17.36-5" +version = "0.17.36-6" dependencies = [ "anyhow", "chrono", @@ -7827,7 +7827,7 @@ dependencies = [ [[package]] name = "subvt-proc-macro" -version = "0.17.36-5" +version = "0.17.36-6" dependencies = [ "proc-macro2", "quote", @@ -7836,7 +7836,7 @@ dependencies = [ [[package]] name = "subvt-referendum-updater" -version = "0.17.36-5" +version = "0.17.36-6" dependencies = [ "anyhow", "async-trait", @@ -7860,7 +7860,7 @@ dependencies = [ [[package]] name = "subvt-report-service" -version = "0.17.36-5" +version = "0.17.36-6" dependencies = [ "actix-web", "anyhow", @@ -7888,7 +7888,7 @@ dependencies = [ [[package]] name = "subvt-service-common" -version = "0.17.36-5" +version = "0.17.36-6" dependencies = [ "actix-web", "anyhow", @@ -7905,7 +7905,7 @@ dependencies = [ [[package]] name = "subvt-substrate-client" -version = "0.17.36-5" +version = "0.17.36-6" dependencies = [ "anyhow", "async-lock", @@ -7934,7 +7934,7 @@ dependencies = [ [[package]] name = "subvt-telegram-bot" -version = "0.17.36-5" +version = "0.17.36-6" dependencies = [ "anyhow", "async-recursion", @@ -7972,7 +7972,7 @@ dependencies = [ [[package]] name = "subvt-telemetry-processor" -version = "0.17.36-5" +version = "0.17.36-6" dependencies = [ "anyhow", "async-lock", @@ -7996,7 +7996,7 @@ dependencies = [ [[package]] name = "subvt-types" -version = "0.17.36-5" +version = "0.17.36-6" dependencies = [ "anyhow", "chrono", @@ -8038,7 +8038,7 @@ dependencies = [ [[package]] name = "subvt-utility" -version = "0.17.36-5" +version = "0.17.36-6" dependencies = [ "anyhow", "hex", @@ -8048,7 +8048,7 @@ dependencies = [ [[package]] name = "subvt-validator-details-server" -version = "0.17.36-5" +version = "0.17.36-6" dependencies = [ "anyhow", "async-trait", @@ -8072,7 +8072,7 @@ dependencies = [ [[package]] name = "subvt-validator-list-server" -version = "0.17.36-5" +version = "0.17.36-6" dependencies = [ "anyhow", "async-trait", @@ -8099,7 +8099,7 @@ dependencies = [ [[package]] name = "subvt-validator-list-updater" -version = "0.17.36-5" +version = "0.17.36-6" dependencies = [ "anyhow", "async-lock", diff --git a/_docker/compose/.env.sample b/_docker/compose/.env.sample index 3a40154d..013c7bbb 100644 --- a/_docker/compose/.env.sample +++ b/_docker/compose/.env.sample @@ -1,4 +1,4 @@ -VERSION=0.17.36-5 +VERSION=0.17.36-6 ENV=production LOG_LEVEL=debug diff --git a/subvt-app-service/Cargo.toml b/subvt-app-service/Cargo.toml index d39927f9..1b165575 100644 --- a/subvt-app-service/Cargo.toml +++ b/subvt-app-service/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "subvt-app-service" -version = "0.17.36-5" +version = "0.17.36-6" edition = "2021" rust-version = "1.67.0" diff --git a/subvt-block-processor/Cargo.toml b/subvt-block-processor/Cargo.toml index 9c9b2a91..763173f6 100644 --- a/subvt-block-processor/Cargo.toml +++ b/subvt-block-processor/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "subvt-block-processor" -version = "0.17.36-5" +version = "0.17.36-6" edition = "2021" rust-version = "1.67.0" diff --git a/subvt-config/Cargo.toml b/subvt-config/Cargo.toml index 719c1c5e..93f159d7 100644 --- a/subvt-config/Cargo.toml +++ b/subvt-config/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "subvt-config" -version = "0.17.36-5" +version = "0.17.36-6" edition = "2021" rust-version = "1.67.0" diff --git a/subvt-governance/Cargo.toml b/subvt-governance/Cargo.toml index a81faab6..01bb907a 100644 --- a/subvt-governance/Cargo.toml +++ b/subvt-governance/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "subvt-governance" -version = "0.17.36-5" +version = "0.17.36-6" edition = "2021" rust-version = "1.67.0" diff --git a/subvt-logging/Cargo.toml b/subvt-logging/Cargo.toml index ae8f3757..e53d4350 100644 --- a/subvt-logging/Cargo.toml +++ b/subvt-logging/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "subvt-logging" -version = "0.17.36-5" +version = "0.17.36-6" edition = "2021" rust-version = "1.67.0" diff --git a/subvt-metrics/Cargo.toml b/subvt-metrics/Cargo.toml index c04ee2b0..f8fde3fd 100644 --- a/subvt-metrics/Cargo.toml +++ b/subvt-metrics/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "subvt-metrics" -version = "0.17.36-5" +version = "0.17.36-6" edition = "2021" rust-version = "1.67.0" diff --git a/subvt-network-status-server/Cargo.toml b/subvt-network-status-server/Cargo.toml index 967f208c..2bc41fe6 100644 --- a/subvt-network-status-server/Cargo.toml +++ b/subvt-network-status-server/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "subvt-network-status-server" -version = "0.17.36-5" +version = "0.17.36-6" edition = "2021" rust-version = "1.67.0" diff --git a/subvt-network-status-updater/Cargo.toml b/subvt-network-status-updater/Cargo.toml index 79fce72c..cde9b17f 100644 --- a/subvt-network-status-updater/Cargo.toml +++ b/subvt-network-status-updater/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "subvt-network-status-updater" -version = "0.17.36-5" +version = "0.17.36-6" edition = "2021" rust-version = "1.67.0" diff --git a/subvt-nft/Cargo.toml b/subvt-nft/Cargo.toml index 26832c8c..54c9301b 100644 --- a/subvt-nft/Cargo.toml +++ b/subvt-nft/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "subvt-nft" -version = "0.17.36-5" +version = "0.17.36-6" edition = "2021" rust-version = "1.67.0" diff --git a/subvt-notification-generator/Cargo.toml b/subvt-notification-generator/Cargo.toml index d330e5b8..6603fc4a 100644 --- a/subvt-notification-generator/Cargo.toml +++ b/subvt-notification-generator/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "subvt-notification-generator" -version = "0.17.36-5" +version = "0.17.36-6" edition = "2021" rust-version = "1.67.0" diff --git a/subvt-notification-processor/Cargo.toml b/subvt-notification-processor/Cargo.toml index 844a9e11..56e91c73 100644 --- a/subvt-notification-processor/Cargo.toml +++ b/subvt-notification-processor/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "subvt-notification-processor" -version = "0.17.36-5" +version = "0.17.36-6" edition = "2021" rust-version = "1.67.0" diff --git a/subvt-onekv-updater/Cargo.toml b/subvt-onekv-updater/Cargo.toml index a301d6ea..1953247f 100644 --- a/subvt-onekv-updater/Cargo.toml +++ b/subvt-onekv-updater/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "subvt-onekv-updater" -version = "0.17.36-5" +version = "0.17.36-6" edition = "2021" rust-version = "1.67.0" diff --git a/subvt-persistence/Cargo.toml b/subvt-persistence/Cargo.toml index 16e13d13..3addb22d 100644 --- a/subvt-persistence/Cargo.toml +++ b/subvt-persistence/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "subvt-persistence" -version = "0.17.36-5" +version = "0.17.36-6" edition = "2021" rust-version = "1.67.0" diff --git a/subvt-plotter/Cargo.toml b/subvt-plotter/Cargo.toml index 9741f87a..82b06ac7 100644 --- a/subvt-plotter/Cargo.toml +++ b/subvt-plotter/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "subvt-plotter" -version = "0.17.36-5" +version = "0.17.36-6" edition = "2021" rust-version = "1.67.0" diff --git a/subvt-proc-macro/Cargo.toml b/subvt-proc-macro/Cargo.toml index 444ca457..aeedbd50 100644 --- a/subvt-proc-macro/Cargo.toml +++ b/subvt-proc-macro/Cargo.toml @@ -3,7 +3,7 @@ proc-macro = true [package] name = "subvt-proc-macro" -version = "0.17.36-5" +version = "0.17.36-6" edition = "2021" rust-version = "1.67.0" diff --git a/subvt-referendum-updater/Cargo.toml b/subvt-referendum-updater/Cargo.toml index 1cceee8d..fc90bc5e 100644 --- a/subvt-referendum-updater/Cargo.toml +++ b/subvt-referendum-updater/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "subvt-referendum-updater" -version = "0.17.36-5" +version = "0.17.36-6" edition = "2021" rust-version = "1.67.0" diff --git a/subvt-report-service/Cargo.toml b/subvt-report-service/Cargo.toml index fde54e6a..fbb535bc 100644 --- a/subvt-report-service/Cargo.toml +++ b/subvt-report-service/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "subvt-report-service" -version = "0.17.36-5" +version = "0.17.36-6" edition = "2021" rust-version = "1.67.0" diff --git a/subvt-report-service/src/validator/mod.rs b/subvt-report-service/src/validator/mod.rs index c3f26f57..fe751269 100644 --- a/subvt-report-service/src/validator/mod.rs +++ b/subvt-report-service/src/validator/mod.rs @@ -1,6 +1,6 @@ use crate::{ResultResponse, ServiceState, CONFIG}; use actix_web::{get, web, HttpResponse}; -use chrono::{DateTime, Datelike, Months, NaiveDateTime, Utc}; +use chrono::{DateTime, Datelike, Days, Months, NaiveDateTime, Utc}; use serde::Deserialize; use std::str::FromStr; use subvt_substrate_client::SubstrateClient; @@ -331,9 +331,10 @@ pub(crate) async fn validator_monhtly_income_service( .with_day(1) .unwrap(); let start_timestamp = NaiveDateTime::from(start_date).and_utc().timestamp_millis(); - let end_timestamp = NaiveDateTime::from(now.date_naive()) - .and_utc() - .timestamp_millis(); + let end_timestamp = + NaiveDateTime::from(now.checked_sub_days(Days::new(1)).unwrap().date_naive()) + .and_utc() + .timestamp_millis(); let rewards = data .postgres .get_rewards_in_time_range(&account_id, start_timestamp as u64, end_timestamp as u64) diff --git a/subvt-service-common/Cargo.toml b/subvt-service-common/Cargo.toml index a7e52c54..edca1ef4 100644 --- a/subvt-service-common/Cargo.toml +++ b/subvt-service-common/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "subvt-service-common" -version = "0.17.36-5" +version = "0.17.36-6" edition = "2021" rust-version = "1.67.0" diff --git a/subvt-substrate-client/Cargo.toml b/subvt-substrate-client/Cargo.toml index f7610817..6f923edd 100644 --- a/subvt-substrate-client/Cargo.toml +++ b/subvt-substrate-client/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "subvt-substrate-client" -version = "0.17.36-5" +version = "0.17.36-6" edition = "2021" rust-version = "1.67.0" diff --git a/subvt-telegram-bot/Cargo.toml b/subvt-telegram-bot/Cargo.toml index 8079c6e1..7ce58441 100644 --- a/subvt-telegram-bot/Cargo.toml +++ b/subvt-telegram-bot/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "subvt-telegram-bot" -version = "0.17.36-5" +version = "0.17.36-6" edition = "2021" rust-version = "1.67.0" diff --git a/subvt-telemetry-processor/Cargo.toml b/subvt-telemetry-processor/Cargo.toml index 9288ceaf..e3116ee1 100644 --- a/subvt-telemetry-processor/Cargo.toml +++ b/subvt-telemetry-processor/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "subvt-telemetry-processor" -version = "0.17.36-5" +version = "0.17.36-6" edition = "2021" rust-version = "1.67.0" diff --git a/subvt-types/Cargo.toml b/subvt-types/Cargo.toml index ce0f81eb..3d1cd0b5 100644 --- a/subvt-types/Cargo.toml +++ b/subvt-types/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "subvt-types" -version = "0.17.36-5" +version = "0.17.36-6" edition = "2021" rust-version = "1.67.0" diff --git a/subvt-utility/Cargo.toml b/subvt-utility/Cargo.toml index fc924cc8..64552b59 100644 --- a/subvt-utility/Cargo.toml +++ b/subvt-utility/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "subvt-utility" -version = "0.17.36-5" +version = "0.17.36-6" edition = "2021" rust-version = "1.67.0" diff --git a/subvt-validator-details-server/Cargo.toml b/subvt-validator-details-server/Cargo.toml index 07c59de8..4b35cdd2 100644 --- a/subvt-validator-details-server/Cargo.toml +++ b/subvt-validator-details-server/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "subvt-validator-details-server" -version = "0.17.36-5" +version = "0.17.36-6" edition = "2021" rust-version = "1.67.0" diff --git a/subvt-validator-list-server/Cargo.toml b/subvt-validator-list-server/Cargo.toml index b78fcbdb..b4ef27da 100644 --- a/subvt-validator-list-server/Cargo.toml +++ b/subvt-validator-list-server/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "subvt-validator-list-server" -version = "0.17.36-5" +version = "0.17.36-6" edition = "2021" rust-version = "1.67.0" diff --git a/subvt-validator-list-updater/Cargo.toml b/subvt-validator-list-updater/Cargo.toml index b25c6529..755479ba 100644 --- a/subvt-validator-list-updater/Cargo.toml +++ b/subvt-validator-list-updater/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "subvt-validator-list-updater" -version = "0.17.36-5" +version = "0.17.36-6" edition = "2021" rust-version = "1.67.0"