Update solidity-by-example.rst

highestBidder is the address.
it's highestBid that should be != 0 to be considered as pending return.

It's that right?
This commit is contained in:
mirgj 2018-02-22 01:42:57 +08:00 committed by GitHub
parent 20d8254029
commit d01786f0aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -272,7 +272,7 @@ activate themselves.
// money back. // money back.
require(msg.value > highestBid); require(msg.value > highestBid);
if (highestBidder != 0) { if (highestBid != 0) {
// Sending back the money by simply using // Sending back the money by simply using
// highestBidder.send(highestBid) is a security risk // highestBidder.send(highestBid) is a security risk
// because it could execute an untrusted contract. // because it could execute an untrusted contract.