From ce4df4542cf6ccc2c6149732bf247085e980f435 Mon Sep 17 00:00:00 2001 From: v03413 Date: Sat, 3 Jan 2026 14:03:51 +0800 Subject: [PATCH] =?UTF-8?q?tron=20=E6=97=A5=E5=BF=97=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/task/tron.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/task/tron.go b/app/task/tron.go index f13f629..8b05414 100644 --- a/app/task/tron.go +++ b/app/task/tron.go @@ -4,6 +4,7 @@ import ( "bytes" "context" "encoding/hex" + "fmt" "math/big" "sync" "time" @@ -80,7 +81,7 @@ func (t *tron) blockRoll(context.Context) { var client = api.NewWalletClient(conn) - var ctx, cancel = context.WithTimeout(context.Background(), time.Second*5) + var ctx, cancel = context.WithTimeout(context.Background(), time.Second*15) block, err1 := client.GetNowBlock2(ctx, nil) defer cancel() @@ -315,7 +316,7 @@ func (t *tron) blockParse(n any) { resourceQueue.In <- resources } - log.Task.Info("区块扫描完成", num, conf.GetBlockSuccRate(conf.Tron), conf.Tron) + log.Task.Info(fmt.Sprintf("区块扫描完成(Tron): %d 成功率:%s", num, conf.GetBlockSuccRate(conf.Tron))) } func (t *tron) blockInitOffset(now int64) {