From 725adcd9f006401d5839dc1cc946002f7ee0573d Mon Sep 17 00:00:00 2001 From: Ramesh Nair Date: Fri, 11 Oct 2019 16:14:33 +0900 Subject: [PATCH] Check calls to _hide() in more places This simply fortifies the logic by checking the return value of calls to `_hide()` in more places. --- src/matching_market.sol | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/matching_market.sol b/src/matching_market.sol index d98a612..46fd8b2 100644 --- a/src/matching_market.sol +++ b/src/matching_market.sol @@ -187,7 +187,7 @@ contract MatchingMarket is MatchingEvents, ExpiringMarket, DSNote { require(!isOfferSorted(id)); //make sure offers[id] is not yet sorted require(isActive(id)); //make sure offers[id] is active - _hide(id); //remove offer from unsorted offers list + require(_hide(id)); //remove offer from unsorted offers list _sort(id, pos); //put offer into the sorted offers list LogInsert(msg.sender, id); return true; @@ -399,7 +399,7 @@ contract MatchingMarket is MatchingEvents, ExpiringMarket, DSNote { //offers[id] must be removed from sorted list because all of it is bought _unsort(id); }else{ - _hide(id); + require(_hide(id)); } } require(super.buy(id, amount));