From 78a6889a818226ce327acae35f9c5000dcafb111 Mon Sep 17 00:00:00 2001
From: kbizikav <132550763+kbizikav@users.noreply.github.com>
Date: Thu, 14 Nov 2024 21:47:38 +0700
Subject: [PATCH] fix sleep time bug (#35)
* fix get_latest
* add version print
* update version
* add version
* add log
* check availability
* print settigs to log
* fix get_latest_withdrawal_timestamp filter
* add x version header
---
Cargo.lock | 2 +-
Cargo.toml | 2 +-
src/external_api/contracts/events.rs | 28 ++++++++++------------
src/external_api/intmax/availability.rs | 18 +++++++++-----
src/external_api/intmax/circulation.rs | 18 +++++++++-----
src/external_api/intmax/gas_estimation.rs | 19 ++++++++++-----
src/external_api/intmax/gnark.rs | 13 ++++++----
src/external_api/intmax/header.rs | 11 +++++++++
src/external_api/intmax/mod.rs | 1 +
src/external_api/intmax/withdrawal.rs | 18 ++++++++++----
src/main.rs | 8 ++++++-
src/services/mining/deterministic_sleep.rs | 7 +++++-
src/services/mod.rs | 4 ++--
src/utils/config.rs | 12 +++++-----
14 files changed, 108 insertions(+), 53 deletions(-)
create mode 100644 src/external_api/intmax/header.rs
diff --git a/Cargo.lock b/Cargo.lock
index 5ad0711..35b87a8 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2708,7 +2708,7 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
[[package]]
name = "mining-cli"
-version = "1.1.6"
+version = "1.1.7"
dependencies = [
"aes-gcm",
"anyhow",
diff --git a/Cargo.toml b/Cargo.toml
index 63e8199..0d41cb0 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "mining-cli"
-version = "1.1.6"
+version = "1.1.7"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
diff --git a/src/external_api/contracts/events.rs b/src/external_api/contracts/events.rs
index be78aee..1b7823f 100644
--- a/src/external_api/contracts/events.rs
+++ b/src/external_api/contracts/events.rs
@@ -5,7 +5,10 @@ use intmax2_zkp::{
};
use log::info;
-use crate::{external_api::contracts::utils::get_latest_block_number, utils::retry::with_retry};
+use crate::{
+ external_api::contracts::utils::{get_block, get_latest_block_number},
+ utils::retry::with_retry,
+};
use super::{
error::BlockchainError,
@@ -159,7 +162,6 @@ pub async fn get_latest_deposit_timestamp(sender: Address) -> Result