Disallow self filling

This commit is contained in:
Remco Bloemen 2018-08-24 10:49:05 -07:00
parent 749c6ecc30
commit 3e4493b389

View File

@ -315,6 +315,12 @@ contract MixinExchangeCore is
); );
} }
// Orders can not be self-filled (use cancel instead)
require(
order.makerAddress != takerAddress,
"INVALID_TAKER"
);
// Validate Maker signature (check only if first time seen) // Validate Maker signature (check only if first time seen)
if (orderInfo.orderTakerAssetFilledAmount == 0) { if (orderInfo.orderTakerAssetFilledAmount == 0) {
require( require(