Remove old reentrancy example

pull/88/head
Bernhard Mueller 7 years ago
parent 06209d66d9
commit a2d98ec5ef
  1. 22
      solidity_examples/reentrancy.sol

@ -1,22 +0,0 @@
contract Reentrancy {
mapping(address => uint) public balances;
function donate(address _to) public payable {
balances[_to] += msg.value;
}
function balanceOf(address _who) public constant returns (uint balance) {
return balances[_who];
}
function withdraw(uint _amount) public {
if(balances[msg.sender] >= _amount) {
if (msg.sender.call.value(_amount)()) {
balances[msg.sender] -= _amount;
}
}
}
function() payable {}
}
Loading…
Cancel
Save