diff options
author | Greg Hysen <greg.hysen@gmail.com> | 2018-05-15 05:19:53 +0800 |
---|---|---|
committer | Greg Hysen <greg.hysen@gmail.com> | 2018-05-19 08:01:06 +0800 |
commit | 061facdcceddbc68620ae710c1f2fb2c99e4d3f3 (patch) | |
tree | 31b6c2c063c9bbdbae7ca316603c6fd0bf48fa84 /packages/contracts/src | |
parent | 3e6e7fb2725a3a1bb9f4ac2f371c0cc8e751b8a1 (diff) | |
download | dexon-sol-tools-061facdcceddbc68620ae710c1f2fb2c99e4d3f3.tar dexon-sol-tools-061facdcceddbc68620ae710c1f2fb2c99e4d3f3.tar.gz dexon-sol-tools-061facdcceddbc68620ae710c1f2fb2c99e4d3f3.tar.bz2 dexon-sol-tools-061facdcceddbc68620ae710c1f2fb2c99e4d3f3.tar.lz dexon-sol-tools-061facdcceddbc68620ae710c1f2fb2c99e4d3f3.tar.xz dexon-sol-tools-061facdcceddbc68620ae710c1f2fb2c99e4d3f3.tar.zst dexon-sol-tools-061facdcceddbc68620ae710c1f2fb2c99e4d3f3.zip |
Removed redundant status checks in matchOrders. Saves gas, plus follows pattern of fillOrder more closely.
Diffstat (limited to 'packages/contracts/src')
-rw-r--r-- | packages/contracts/src/contracts/current/protocol/Exchange/MixinMatchOrders.sol | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/packages/contracts/src/contracts/current/protocol/Exchange/MixinMatchOrders.sol b/packages/contracts/src/contracts/current/protocol/Exchange/MixinMatchOrders.sol index b20bc14ad..9ea44beab 100644 --- a/packages/contracts/src/contracts/current/protocol/Exchange/MixinMatchOrders.sol +++ b/packages/contracts/src/contracts/current/protocol/Exchange/MixinMatchOrders.sol @@ -63,10 +63,6 @@ contract MixinMatchOrders is leftOrderInfo.orderHash, leftOrderInfo.orderFilledAmount ) = getOrderInfo(leftOrder); - if (leftOrderInfo.orderStatus != uint8(Status.ORDER_FILLABLE)) { - emit ExchangeStatus(uint8(leftOrderInfo.orderStatus), leftOrderInfo.orderHash); - return matchedFillResults; - } // Get right status OrderInfo memory rightOrderInfo; @@ -74,10 +70,6 @@ contract MixinMatchOrders is rightOrderInfo.orderHash, rightOrderInfo.orderFilledAmount ) = getOrderInfo(rightOrder); - if (rightOrderInfo.orderStatus != uint8(Status.ORDER_FILLABLE)) { - emit ExchangeStatus(uint8(rightOrderInfo.orderStatus), rightOrderInfo.orderHash); - return matchedFillResults; - } // Fetch taker address address takerAddress = getCurrentContextAddress(); |