Browse Source

7.2 add preconditions to Shareable contructor

Manuel Araoz 8 years ago
parent
commit
fad287007b
1 changed files with 3 additions and 0 deletions
  1. 3 0
      contracts/ownership/Shareable.sol

+ 3 - 0
contracts/ownership/Shareable.sol

@@ -64,6 +64,9 @@ contract Shareable {
       ownerIndex[_owners[i]] = 2 + i;
     }
     required = _required;
+    if (required > owners.length) {
+      throw;
+    }
   }
 
   // Revokes a prior confirmation of the given operation