Update modifiers so that they fail "loudly" by throwing errors rather then silently no-oping. Updated tests to remain compatible with these changes

This commit is contained in:
Fabio Berger
2017-02-21 00:05:59 +01:00
parent c10a2cf15c
commit 3d6988cf90
7 changed files with 52 additions and 26 deletions

View File

@ -58,8 +58,9 @@ contract DayLimit {
// simple modifier for daily limit.
modifier limitedDaily(uint _value) {
if (underLimit(_value)) {
_;
if (!underLimit(_value)) {
throw;
}
_;
}
}