mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-17 01:13:45 +00:00
chequebook: use modern transfer method
This commit is contained in:
parent
f9b88bac27
commit
c9320fd1b7
1 changed files with 1 additions and 4 deletions
|
|
@ -33,10 +33,7 @@ contract chequebook is mortal {
|
|||
if (diff <= this.balance) {
|
||||
// update the cumulative amount before sending
|
||||
sent[beneficiary] = amount;
|
||||
if (!beneficiary.send(diff)) {
|
||||
// Upon failure to execute send, revert everything
|
||||
throw;
|
||||
}
|
||||
beneficiary.transfer(diff);
|
||||
} else {
|
||||
// Upon failure, punish owner for writing a bounced cheque.
|
||||
// owner.sendToDebtorsPrison();
|
||||
|
|
|
|||
Loading…
Reference in a new issue