aboutsummaryrefslogtreecommitdiffstats
path: root/docs/solidity-by-example.rst
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2017-11-24 01:43:19 +0800
committerGitHub <noreply@github.com>2017-11-24 01:43:19 +0800
commitd0be67f6b061a93ea014b430fdb04b5bc446c9c3 (patch)
tree64a38bcf88257de2bc626005280a8f141aade277 /docs/solidity-by-example.rst
parentb8d59422d15adcbbf4e0df24c12cf03f9a584aa1 (diff)
downloaddexon-solidity-d0be67f6b061a93ea014b430fdb04b5bc446c9c3.tar.gz
dexon-solidity-d0be67f6b061a93ea014b430fdb04b5bc446c9c3.tar.zst
dexon-solidity-d0be67f6b061a93ea014b430fdb04b5bc446c9c3.zip
Bugfix in blind auction
Diffstat (limited to 'docs/solidity-by-example.rst')
-rw-r--r--docs/solidity-by-example.rst7
1 files changed, 3 insertions, 4 deletions
diff --git a/docs/solidity-by-example.rst b/docs/solidity-by-example.rst
index 59ab7962..9489665e 100644
--- a/docs/solidity-by-example.rst
+++ b/docs/solidity-by-example.rst
@@ -492,7 +492,7 @@ high or low invalid bids.
if (amount > 0) {
// It is important to set this to zero because the recipient
// can call this function again as part of the receiving call
- // before `send` returns (see the remark above about
+ // before `transfer` returns (see the remark above about
// conditions -> effects -> interaction).
pendingReturns[msg.sender] = 0;
@@ -508,12 +508,11 @@ high or low invalid bids.
require(!ended);
AuctionEnded(highestBidder, highestBid);
ended = true;
- // We send all the money we have, because some
- // of the refunds might have failed.
- beneficiary.transfer(this.balance);
+ beneficiary.transfer(highestBid);
}
}
+
.. index:: purchase, remote purchase, escrow
********************