diff options
author | chriseth <chris@ethereum.org> | 2017-09-21 22:56:16 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-21 22:56:16 +0800 |
commit | bdeb9e52a2211510644fb53df93fb98258b40a65 (patch) | |
tree | d8fb917e7dc27b937cb4505029bbc3c8c1bc1a67 /docs/solidity-by-example.rst | |
parent | d7661dd97460250b4e1127b9e7ea91e116143780 (diff) | |
parent | a14fc5ffa1f03d5aa312396a39633d720b04c90a (diff) | |
download | dexon-solidity-bdeb9e52a2211510644fb53df93fb98258b40a65.tar dexon-solidity-bdeb9e52a2211510644fb53df93fb98258b40a65.tar.gz dexon-solidity-bdeb9e52a2211510644fb53df93fb98258b40a65.tar.bz2 dexon-solidity-bdeb9e52a2211510644fb53df93fb98258b40a65.tar.lz dexon-solidity-bdeb9e52a2211510644fb53df93fb98258b40a65.tar.xz dexon-solidity-bdeb9e52a2211510644fb53df93fb98258b40a65.tar.zst dexon-solidity-bdeb9e52a2211510644fb53df93fb98258b40a65.zip |
Merge pull request #2947 from ethereum/develop
Merge develop into release for 0.4.17.
Diffstat (limited to 'docs/solidity-by-example.rst')
-rw-r--r-- | docs/solidity-by-example.rst | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/docs/solidity-by-example.rst b/docs/solidity-by-example.rst index ca6b970c..139c8a42 100644 --- a/docs/solidity-by-example.rst +++ b/docs/solidity-by-example.rst @@ -535,6 +535,9 @@ Safe Remote Purchase enum State { Created, Locked, Inactive } State public state; + // Ensure that `msg.value` is an even number. + // Division will truncate if it is an odd number. + // Check via multiplication that it wasn't an odd number. function Purchase() payable { seller = msg.sender; value = msg.value / 2; |