aboutsummaryrefslogtreecommitdiffstats
path: root/docs/solidity-by-example.rst
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-08-09 21:36:00 +0800
committerchriseth <chris@ethereum.org>2018-08-14 21:50:46 +0800
commit6cf299bec6b89b22d97e39d7db54f9dc4f652cfb (patch)
treec68420316cbbfb30522a13a5aeae7c716ea49d1a /docs/solidity-by-example.rst
parentf873389c6227d41dbba9ba4c23ed055f286ecb71 (diff)
downloaddexon-solidity-6cf299bec6b89b22d97e39d7db54f9dc4f652cfb.tar.gz
dexon-solidity-6cf299bec6b89b22d97e39d7db54f9dc4f652cfb.tar.zst
dexon-solidity-6cf299bec6b89b22d97e39d7db54f9dc4f652cfb.zip
Update documentation examples.
Diffstat (limited to 'docs/solidity-by-example.rst')
-rw-r--r--docs/solidity-by-example.rst10
1 files changed, 5 insertions, 5 deletions
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);
}