Golang implemented sidechain for Bytom
Revision | 7f3c6546b3ae511971e3548b17b610ffeb6bd15f (tree) |
---|---|
Zeit | 2020-03-25 14:51:58 |
Autor | shenao78 <shenao.78@163....> |
Commiter | shenao78 |
fix mov enginej
@@ -130,10 +130,9 @@ func addMatchTxOutput(txData *types.TxData, orders []*common.Order, receivedAmou | ||
130 | 130 | return err |
131 | 131 | } |
132 | 132 | |
133 | - requestAmount := CalcRequestAmount(order.Utxo.Amount, contractArgs.RatioNumerator, contractArgs.RatioDenominator) | |
134 | 133 | receivedAmount := receivedAmounts[i].Amount |
135 | 134 | shouldPayAmount := calcShouldPayAmount(receivedAmount, contractArgs.RatioNumerator, contractArgs.RatioDenominator) |
136 | - isPartialTrade := requestAmount > receivedAmount | |
135 | + isPartialTrade := order.Utxo.Amount > shouldPayAmount | |
137 | 136 | |
138 | 137 | setMatchTxArguments(txData.Inputs[i], isPartialTrade, len(txData.Outputs), receivedAmounts[i].Amount) |
139 | 138 | txData.Outputs = append(txData.Outputs, types.NewIntraChainOutput(*order.ToAssetID, deductFeeReceives[i].Amount, contractArgs.SellerProgram)) |