Merge pull request #506 from TalAter/fix/deprecated-throw-in-tests

Replace deprecated throw with assert in Solidity tests
This commit is contained in:
Facundo Spagnuolo
2017-11-21 14:41:31 -03:00
committed by GitHub
2 changed files with 2 additions and 6 deletions

View File

@ -3,9 +3,7 @@ pragma solidity ^0.4.11;
contract ReentrancyAttack {
function callSender(bytes4 data) {
if(!msg.sender.call(data)) {
throw;
}
require(msg.sender.call(data));
}
}

View File

@ -27,9 +27,7 @@ contract ReentrancyMock is ReentrancyGuard {
if(n > 0) {
count();
bool result = this.call(func, n - 1);
if(result != true) {
throw;
}
require(result == true);
}
}