Replace deprecated throw with assert in Solidity tests
This commit is contained in:
@ -3,9 +3,7 @@ pragma solidity ^0.4.11;
|
|||||||
contract ReentrancyAttack {
|
contract ReentrancyAttack {
|
||||||
|
|
||||||
function callSender(bytes4 data) {
|
function callSender(bytes4 data) {
|
||||||
if(!msg.sender.call(data)) {
|
assert(msg.sender.call(data));
|
||||||
throw;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -27,9 +27,7 @@ contract ReentrancyMock is ReentrancyGuard {
|
|||||||
if(n > 0) {
|
if(n > 0) {
|
||||||
count();
|
count();
|
||||||
bool result = this.call(func, n - 1);
|
bool result = this.call(func, n - 1);
|
||||||
if(result != true) {
|
assert(result == true);
|
||||||
throw;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user