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) {
|
if (diff <= this.balance) {
|
||||||
// update the cumulative amount before sending
|
// update the cumulative amount before sending
|
||||||
sent[beneficiary] = amount;
|
sent[beneficiary] = amount;
|
||||||
if (!beneficiary.send(diff)) {
|
beneficiary.transfer(diff);
|
||||||
// Upon failure to execute send, revert everything
|
|
||||||
throw;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
// Upon failure, punish owner for writing a bounced cheque.
|
// Upon failure, punish owner for writing a bounced cheque.
|
||||||
// owner.sendToDebtorsPrison();
|
// owner.sendToDebtorsPrison();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue