1
This commit is contained in:
parent
9982b8bc9a
commit
9775c0da00
@ -95,6 +95,8 @@ func (this *vip) RecalcEsCecConvert(accountAddress string) error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
matchDeposits := []*vesterDepositWithdrawPo{}
|
||||||
|
{
|
||||||
var lastWithdraw *vesterDepositWithdrawPo
|
var lastWithdraw *vesterDepositWithdrawPo
|
||||||
allDeposits := []*vesterDepositWithdrawPo{}
|
allDeposits := []*vesterDepositWithdrawPo{}
|
||||||
for ds.Next() {
|
for ds.Next() {
|
||||||
@ -113,5 +115,14 @@ func (this *vip) RecalcEsCecConvert(accountAddress string) error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
for _, val := range allDeposits {
|
||||||
|
if lastWithdraw == nil || val.chainTimestamp > lastWithdraw.chainTimestamp {
|
||||||
|
q5.AppendSlice(&matchDeposits, val)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
q5.Sort(matchDeposits, func (a *vesterDepositWithdrawPo, b *vesterDepositWithdrawPo) bool {
|
||||||
|
return a.chainTimestamp < b.chainTimestamp
|
||||||
|
})
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user