diff --git a/server/jccommon/constant.go b/server/jccommon/constant.go index f11725e9..c8192ac5 100644 --- a/server/jccommon/constant.go +++ b/server/jccommon/constant.go @@ -34,6 +34,7 @@ const ( CONTRACT_NAME_FounderTag = "FounderTag" CONTRACT_NAME_NFTLock = "NFTLock" CONTRACT_NAME_GameItemMall = "GameItemMall" + CONTRACT_NAME_RewardRouter = "rewardRouter" ) const ( diff --git a/server/light_backtask/task/stacking_go.go b/server/light_backtask/task/stacking_go.go index c6ddde1d..49aa4b69 100644 --- a/server/light_backtask/task/stacking_go.go +++ b/server/light_backtask/task/stacking_go.go @@ -4,9 +4,7 @@ import ( "q5" "f5" "main/mt" - "main/service" "jccommon" - "time" ) type stackingCec struct { @@ -20,9 +18,9 @@ type accountStackingCec struct { func (this* stackingCec) init() { this.lockMetas = []*mt.Contract{} mt.Table.Contract.Traverse(func (ele *mt.Contract) bool { - if ele.GetName() == jccommon.CONTRACT_NAME_NFTLock { + if ele.GetName() == jccommon.CONTRACT_NAME_RewardRouter { q5.AppendSlice(&this.lockMetas, ele) - f5.GetSysLog().Info("task.contribution.init load lockMetas net_id:%d name:%s contract_address:%s", + f5.GetSysLog().Info("task.rewardRouter.init load lockMetas net_id:%d name:%s contract_address:%s", ele.GetNetId(), ele.GetName(), ele.GetAddress()) @@ -30,34 +28,14 @@ func (this* stackingCec) init() { return true }) if len(this.lockMetas) <= 0 { - panic("task.contribution.init lockMetas is empty") + panic("task.rewardRouter.init lockMetas is empty") return } - go this.calc() } func (this* stackingCec) unInit() { } -func (this* stackingCec) stat(statTime int64, nowTime int64) { -} - -func (this* stackingCec) calc() { - for true { - nowTime := f5.GetApp().GetRealSeconds() - this.stat(nowTime - 3600 * 24, nowTime) - - nowTime = f5.GetApp().GetRealSeconds() - daySeconds := q5.GetDaySeconds(nowTime, 0) - sleepTime := daySeconds + 3600 * 24 - nowTime + 3 - time.Sleep(time.Second * time.Duration(sleepTime)) - } -} - -func (this* stackingCec) isStatEd(statDaySeconds int64) (error, bool) { - return nil, false -} - func (this* stackingCec) loadFromDb(addressHash *q5.ConcurrentMap[string, *accountStackingCec], ds *f5.DataSet) bool { accountAddress := ds.GetByName("last_lock_address") @@ -85,4 +63,3 @@ func (this* stackingCec) loadFromDb(addressHash *q5.ConcurrentMap[string, *accou func (this* stackingCec) saveToDb() { } -,