• R/O
  • HTTP
  • SSH
  • HTTPS

vapor: 提交

Golang implemented sidechain for Bytom


Commit MetaInfo

修订版5777b52b8a7335347ee90d84dcfcfff8263fd0a7 (tree)
时间2020-03-25 23:33:07
作者paladz <453256728@qq.c...>
Commiterpaladz

Log Message

edit back 5% fee

更改概述

差异

--- a/application/mov/match/fee_strategy.go
+++ b/application/mov/match/fee_strategy.go
@@ -44,12 +44,13 @@ func (d *DefaultFeeStrategy) Allocate(receiveAmounts, priceDiffs []*bc.AssetAmou
4444 fees := make([]*bc.AssetAmount, len(receiveAmounts))
4545
4646 for i, receiveAmount := range receiveAmounts {
47- fee := d.calcMinFeeAmount(receiveAmount.Amount) + priceDiffs[i].Amount
47+ standFee := d.calcMinFeeAmount(receiveAmount.Amount)
48+ fee := standFee + priceDiffs[i].Amount
4849 if maxFeeAmount := d.calcMaxFeeAmount(receiveAmount.Amount); fee > maxFeeAmount {
4950 fee = maxFeeAmount
5051 }
5152
52- receives[i] = &bc.AssetAmount{AssetId: receiveAmount.AssetId, Amount: receiveAmount.Amount - fee}
53+ receives[i] = &bc.AssetAmount{AssetId: receiveAmount.AssetId, Amount: receiveAmount.Amount - standFee}
5354 fees[i] = &bc.AssetAmount{AssetId: receiveAmount.AssetId, Amount: fee}
5455 }
5556 return &AllocatedAssets{Receives: receives, Fees: fees}
Show on old repository browser