This commit is contained in:
aozhiwei 2024-09-03 16:24:26 +08:00
parent 2096a835af
commit 612a01f38b

View File

@ -151,17 +151,17 @@ func (this *stackingCec) apply(idx int64, eventName string,
if dbErr != nil {
return false
}
srcAmount := "0"
if ds.Next() {
if idx <= q5.ToInt64(ds.GetByName("last_apply_record_idx")) {
return true
}
bnNewAmount, ok := new(big.Int).SetString(ds.GetByName("amount"), 10)
if !ok {
return false
}
bnNewAmount.Add(bnNewAmount, bnAmount)
} else {
srcAmount = ds.GetByName("amount")
}
bnNewAmount, ok := new(big.Int).SetString(srcAmount, 10)
if !ok {
return false
}
bnNewAmount.Add(bnNewAmount, bnAmount)
return true
}