diff options
author | chriseth <chris@ethereum.org> | 2018-06-13 23:49:41 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2018-06-25 23:17:18 +0800 |
commit | 17493e64ed986c33bb5562eabafca2d52b212f19 (patch) | |
tree | 25ac5961633e2813bd4a6bc53b883f690f61f506 /docs/solidity-by-example.rst | |
parent | 237788c0bc204eb08ba7000cd51c0c62ecb777c6 (diff) | |
download | dexon-solidity-17493e64ed986c33bb5562eabafca2d52b212f19.tar.gz dexon-solidity-17493e64ed986c33bb5562eabafca2d52b212f19.tar.zst dexon-solidity-17493e64ed986c33bb5562eabafca2d52b212f19.zip |
Documentation.
Diffstat (limited to 'docs/solidity-by-example.rst')
-rw-r--r-- | docs/solidity-by-example.rst | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/solidity-by-example.rst b/docs/solidity-by-example.rst index e8fddd61..fcdd1862 100644 --- a/docs/solidity-by-example.rst +++ b/docs/solidity-by-example.rst @@ -428,8 +428,8 @@ high or low invalid bids. revealEnd = biddingEnd + _revealTime; } - /// Place a blinded bid with `_blindedBid` = keccak256(value, - /// fake, secret). + /// Place a blinded bid with `_blindedBid` = + /// keccak256(abi.encodePacked(value, fake, secret)). /// The sent ether is only refunded if the bid is correctly /// revealed in the revealing phase. The bid is valid if the /// ether sent together with the bid is at least "value" and @@ -470,7 +470,7 @@ high or low invalid bids. Bid storage bid = bids[msg.sender][i]; (uint value, bool fake, bytes32 secret) = (_values[i], _fake[i], _secret[i]); - if (bid.blindedBid != keccak256(value, fake, secret)) { + if (bid.blindedBid != keccak256(abi.encodePacked(value, fake, secret))) { // Bid was not actually revealed. // Do not refund deposit. continue; |