• R/O
  • HTTP
  • SSH
  • HTTPS

vapor: 提交

Golang implemented sidechain for Bytom


Commit MetaInfo

修订版76138f4b41f23c357e0ff0fb0e561acda28c89bd (tree)
时间2020-03-26 01:59:10
作者paladz <453256728@qq.c...>
Commiterpaladz

Log Message

fix the overheader

更改概述

差异

--- a/application/mov/match/engine.go
+++ b/application/mov/match/engine.go
@@ -206,7 +206,10 @@ func CalcReceivedAmount(orders []*common.Order) ([]*bc.AssetAmount, []*bc.AssetA
206206
207207 for i, receivedAmount := range receivedAmounts {
208208 oppositeShouldPayAmount := shouldPayAmounts[calcOppositeIndex(len(orders), i)]
209- priceDiffs = append(priceDiffs, &bc.AssetAmount{AssetId: oppositeShouldPayAmount.AssetId, Amount: oppositeShouldPayAmount.Amount - receivedAmount.Amount})
209+ priceDiffs = append(priceDiffs, &bc.AssetAmount{AssetId: oppositeShouldPayAmount.AssetId, Amount: 0})
210+ if oppositeShouldPayAmount.Amount > receivedAmount.Amount {
211+ priceDiffs[i].Amount = oppositeShouldPayAmount.Amount - receivedAmount.Amount
212+ }
210213 }
211214 return receivedAmounts, priceDiffs
212215 }
Show on old repository browser