From 75dfe74a96ea23c09495d66cbb37131b385c21a7 Mon Sep 17 00:00:00 2001 From: Info Island Date: Wed, 10 Apr 2024 04:13:01 +0800 Subject: [PATCH] feat: add init message --- .envrc | 4 ++++ .gitignore | 3 ++- src/main.ts | 5 +++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.envrc b/.envrc index 28fe981..6057033 100644 --- a/.envrc +++ b/.envrc @@ -9,6 +9,10 @@ export NX_WORKSPACE_ROOT=$DIR PATH_add node_modules/.bin PATH_add tools/bin +if [ -f .envrc.override ]; then + source_env .envrc.override +fi + # export updated ENV of this file node "${NX_WORKSPACE_ROOT}/tools/bin/get-env" "${__prevEnv__}" "$(env)" > "${NX_WORKSPACE_ROOT}/.env" & diff --git a/.gitignore b/.gitignore index edb700e..6bad662 100644 --- a/.gitignore +++ b/.gitignore @@ -39,4 +39,5 @@ testem.log Thumbs.db .nx/cache -.env \ No newline at end of file +.env +.envrc.override \ No newline at end of file diff --git a/src/main.ts b/src/main.ts index 5e73926..92d87f3 100644 --- a/src/main.ts +++ b/src/main.ts @@ -241,6 +241,11 @@ class Tracker { } await this.startUp(); + await alertToTelegram('reorg', 'start', { + latestHeight: this.latestHeight.toString(), + latestTip: this.latestTip, + message: `Started tracking from block ${this.latestHeight}`, + }); // eslint-disable-next-line no-constant-condition while (true) { await this.check();