From 6cf299bec6b89b22d97e39d7db54f9dc4f652cfb Mon Sep 17 00:00:00 2001 From: chriseth Date: Thu, 9 Aug 2018 15:36:00 +0200 Subject: Update documentation examples. --- docs/solidity-by-example.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'docs/solidity-by-example.rst') diff --git a/docs/solidity-by-example.rst b/docs/solidity-by-example.rst index 3f054297..7d325746 100644 --- a/docs/solidity-by-example.rst +++ b/docs/solidity-by-example.rst @@ -467,22 +467,22 @@ high or low invalid bids. uint refund; for (uint i = 0; i < length; i++) { - Bid storage bid = bids[msg.sender][i]; + Bid storage bidToCheck = bids[msg.sender][i]; (uint value, bool fake, bytes32 secret) = (_values[i], _fake[i], _secret[i]); - if (bid.blindedBid != keccak256(abi.encodePacked(value, fake, secret))) { + if (bidToCheck.blindedBid != keccak256(abi.encodePacked(value, fake, secret))) { // Bid was not actually revealed. // Do not refund deposit. continue; } - refund += bid.deposit; - if (!fake && bid.deposit >= value) { + refund += bidToCheck.deposit; + if (!fake && bidToCheck.deposit >= value) { if (placeBid(msg.sender, value)) refund -= value; } // Make it impossible for the sender to re-claim // the same deposit. - bid.blindedBid = bytes32(0); + bidToCheck.blindedBid = bytes32(0); } msg.sender.transfer(refund); } -- cgit v1.2.3