Explain safe purchase (even number)

This commit is contained in:
Alex Beregszaszi 2017-08-28 12:14:41 +01:00
parent 5a5d21d0c8
commit 550d646b97

View File

@ -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;