From ec837c26b31afd2a473d4f606eda16bfacce5847 Mon Sep 17 00:00:00 2001 From: yangduo Date: Tue, 15 Oct 2024 17:44:33 +0800 Subject: [PATCH] fix --- server/light_backtask/service/vip.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/server/light_backtask/service/vip.go b/server/light_backtask/service/vip.go index e7b502c8..c2cf4c8e 100644 --- a/server/light_backtask/service/vip.go +++ b/server/light_backtask/service/vip.go @@ -1,12 +1,12 @@ package service import ( - "q5" "f5" - "sync" - "strings" "main/constant" "math/big" + "q5" + "strings" + "sync" ) type vip struct { @@ -151,7 +151,7 @@ Withdraw 所有 按时间排序处理事件的先后顺序 -通过Vester.sol的remainingEsToken方法获取, 如果要本地计算的话, 那就取每次Deposit事件的时间和amount, 加上先前的转换的余额, 再按total * (now - deposit_time) / (365 * 24 * 2600) +通过Vester.sol的remainingEsToken方法获取, 如果要本地计算的话, 那就取每次Deposit事件的时间和amount, 加上先前的转换的余额, 再按total * (now - deposit_time) / (365 * 24 * 3600) */ func (this *vip) RecalcEsCecConvert(accountAddress string) error { @@ -202,7 +202,7 @@ func (this *vip) RecalcEsCecConvert(accountAddress string) error { if lastDeposit != nil { if nowTime > lastDeposit.chainTimestamp { bnPassTime := new(big.Int).SetInt64(int64(nowTime - lastDeposit.chainTimestamp)) - bnTotalTime := new(big.Int).SetInt64(int64(365 * 24 * 2600)) + bnTotalTime := new(big.Int).SetInt64(int64(365 * 24 * 3600)) bnTmp := bnTotal.Mul(bnTotal, bnPassTime) bnInterest := bnTmp.Div(bnTmp, bnTotalTime) bnTotal = bnTotal.Sub(bnTotal, bnInterest)