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 { if dbErr != nil {
return false return false
} }
srcAmount := "0"
if ds.Next() { if ds.Next() {
if idx <= q5.ToInt64(ds.GetByName("last_apply_record_idx")) { if idx <= q5.ToInt64(ds.GetByName("last_apply_record_idx")) {
return true return true
} }
bnNewAmount, ok := new(big.Int).SetString(ds.GetByName("amount"), 10) srcAmount = ds.GetByName("amount")
if !ok {
return false
}
bnNewAmount.Add(bnNewAmount, bnAmount)
} else {
} }
bnNewAmount, ok := new(big.Int).SetString(srcAmount, 10)
if !ok {
return false
}
bnNewAmount.Add(bnNewAmount, bnAmount)
return true return true
} }