{"comment":{"url":"https://api.github.com/repos/LluisaMarsal/B9Lab-Project2/comments/31465409","html_url":"https://github.com/LluisaMarsal/B9Lab-Project2/commit/f940e629048f2b360262425d1c72c8297e8324de#commitcomment-31465409","id":31465409,"node_id":"MDEzOkNvbW1pdENvbW1lbnQzMTQ2NTQwOQ==","user":{"login":"xavierlepretre","id":5309374,"node_id":"MDQ6VXNlcjUzMDkzNzQ=","avatar_url":"https://avatars0.githubusercontent.com/u/5309374?v=4","gravatar_id":"","url":"https://api.github.com/users/xavierlepretre","html_url":"https://github.com/xavierlepretre","followers_url":"https://api.github.com/users/xavierlepretre/followers","following_url":"https://api.github.com/users/xavierlepretre/following{/other_user}","gists_url":"https://api.github.com/users/xavierlepretre/gists{/gist_id}","starred_url":"https://api.github.com/users/xavierlepretre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xavierlepretre/subscriptions","organizations_url":"https://api.github.com/users/xavierlepretre/orgs","repos_url":"https://api.github.com/users/xavierlepretre/repos","events_url":"https://api.github.com/users/xavierlepretre/events{/privacy}","received_events_url":"https://api.github.com/users/xavierlepretre/received_events","type":"User","site_admin":false},"position":32,"line":42,"path":"contracts/Remittance.sol","commit_id":"f940e629048f2b360262425d1c72c8297e8324de","created_at":"2018-11-27T11:59:41Z","updated_at":"2018-11-27T11:59:41Z","author_association":"NONE","body":"Let's look at the business angle. When you deploy this contract in the wild, you want your users to feel like their concerns are being taken care of. Let's reuse the suitcase locker.\r\nNowadays, there may be a central console that will unlock a locker for you. I see 2 ways they can do it:\r\n\r\n1. the control system picks an empty locker for you and tells you its number. You go there.\r\n2. the control system lets you choose a locker from its empty list.\r\n\r\nWould you go and drop your suitcase again if:\r\n\r\n3. the control system lets you choose a locker, empty of not.\r\n\r\nWhat you did with your code above, which does not check the locker is empty and does `+=`, is that your system functions as per 3.\r\n\r\nSo, yes, for every `bytes32` there is a remittance box. I said \"for every `bytes32`\". I did not say \"for every `bytes32` mentioned by Alice\".\r\nIf a certain `0x123...` is mentioned by Alice, that is the very same box as the `0x123...` mentioned by Dan. So are you going to mix Alice's and Dan's remittance because they happen to have come up with the same id?\r\n\r\nHere the smart contract will make or break your business case."}}
{"actor":{"display_login":"xavierlepretre"}}