Update worker.go

pull/541/head
jagdeep sidhu 2020-12-22 08:29:21 -08:00
parent 6fe32fae4f
commit a6fc06b5ac
1 changed files with 2 additions and 1 deletions

View File

@ -126,13 +126,14 @@ func (w *Worker) getAuxFee(auxFeeDetails *bchain.AuxFeeDetails, nAmount int64) *
nValue := int64(0)
nAccumulatedFee := int64(0)
nRate := float64(0)
nBoundAmount := int64(0)
for i := range auxFeeDetails.AuxFees {
fee := &auxFeeDetails.AuxFees[i]
feeNext := &auxFeeDetails.AuxFees[i]
if i < len(auxFeeDetails.AuxFees)-1 {
feeNext = &auxFeeDetails.AuxFees[i+1]
}
nBoundAmount := fee.Bound
nBoundAmount = fee.Bound
nNextBoundAmount := feeNext.Bound
// max uint16 (65535 = 0.65535 = 65.5535%)
nRate := float64(fee.Percent) / 100000.0;