• R/O
  • HTTP
  • SSH
  • HTTPS

vapor: コミット

Golang implemented sidechain for Bytom


コミットメタ情報

リビジョン545407d960070ec2edbd95efbcb985d4b3b10cf6 (tree)
日時2020-03-25 23:37:18
作者paladz <453256728@qq.c...>
コミッターpaladz

ログメッセージ

add for fix

変更サマリ

差分

--- a/application/mov/match/engine.go
+++ b/application/mov/match/engine.go
@@ -68,6 +68,7 @@ func (e *Engine) addMatchTxFeeOutput(txData *types.TxData, fees []*bc.AssetAmoun
6868 }
6969
7070 refoundAmount := map[bc.AssetID]uint64{}
71+ assetIDs := []bc.AssetID{}
7172 refoundScript := [][]byte{}
7273 for _, input := range txData.Inputs {
7374 refoundAmount[input.AssetID()] += input.Amount()
@@ -76,6 +77,7 @@ func (e *Engine) addMatchTxFeeOutput(txData *types.TxData, fees []*bc.AssetAmoun
7677 return err
7778 }
7879
80+ assetIDs = append(assetIDs, input.AssetID())
7981 refoundScript = append(refoundScript, contractArgs.SellerProgram)
8082 }
8183
@@ -85,7 +87,8 @@ func (e *Engine) addMatchTxFeeOutput(txData *types.TxData, fees []*bc.AssetAmoun
8587 }
8688
8789 refoundCount := len(refoundScript)
88- for assetID, amount := range refoundAmount {
90+ for _, assetID := range assetIDs {
91+ amount := refoundAmount[assetID]
8992 averageAmount := amount / uint64(refoundCount)
9093 if averageAmount == 0 {
9194 averageAmount = 1
旧リポジトリブラウザで表示