From d22f8d3b064fb3d6ddb448d052a11ca4207118c9 Mon Sep 17 00:00:00 2001 From: Oleg Baranov Date: Wed, 18 Sep 2024 11:21:31 +0400 Subject: [PATCH 1/3] Update README.md --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index a5e0947..0e85516 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,6 @@ You could also join our **[Telegram channel](https://t.me/tonutilsnews)** and ** You can use liteservers from TON configs: * Mainnet public servers - `https://ton.org/global.config.json` * Testnet public servers - `https://ton-blockchain.github.io/testnet-global.config.json` -* Mainnet servers by Tonutils - `https://tonutils.com/ls/free-mainnet-config.json` from liteservers section, you need to convert int to ip and take port and key. From f80aa6005634c04b62d8144243611b870ba31553 Mon Sep 17 00:00:00 2001 From: defi2026-dev Date: Sat, 28 Sep 2024 11:04:00 +0800 Subject: [PATCH 2/3] fix: break loop when exhausted all transactions --- ton/transactions.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ton/transactions.go b/ton/transactions.go index a3f2888..9fc58f0 100644 --- a/ton/transactions.go +++ b/ton/transactions.go @@ -5,12 +5,13 @@ import ( "context" "errors" "fmt" + "strings" + "time" + "github.com/xssnick/tonutils-go/address" "github.com/xssnick/tonutils-go/tl" "github.com/xssnick/tonutils-go/tlb" "github.com/xssnick/tonutils-go/tvm/cell" - "strings" - "time" ) func init() { @@ -224,6 +225,11 @@ func (c *APIClient) SubscribeOnTransactions(workerCtx context.Context, addr *add case <-time.After(waitList): } + if lastLT == 0 { + // exhausted all transactins + break + } + ctx, cancel = context.WithTimeout(workerCtx, 10*time.Second) res, err := c.ListTransactions(ctx, addr, 10, lastLT, lastHash) cancel() From 72f37fe63fd441aaa0191326331117d4f604a918 Mon Sep 17 00:00:00 2001 From: defi2026-dev Date: Sat, 28 Sep 2024 11:06:43 +0800 Subject: [PATCH 3/3] Update ton/transactions.go --- ton/transactions.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ton/transactions.go b/ton/transactions.go index 9fc58f0..3536ab0 100644 --- a/ton/transactions.go +++ b/ton/transactions.go @@ -226,7 +226,7 @@ func (c *APIClient) SubscribeOnTransactions(workerCtx context.Context, addr *add } if lastLT == 0 { - // exhausted all transactins + // exhausted all transactions break }