{"action":"created","issue":{"url":"https://api.github.com/repos/bitcoin/bitcoin/issues/7844","repository_url":"https://api.github.com/repos/bitcoin/bitcoin","labels_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/7844/labels{/name}","comments_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/7844/comments","events_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/7844/events","html_url":"https://github.com/bitcoin/bitcoin/issues/7844","id":147028879,"number":7844,"title":"Improve nStartTime value code quality","user":{"login":"GSPP","id":12032350,"avatar_url":"https://avatars.githubusercontent.com/u/12032350?v=3","gravatar_id":"","url":"https://api.github.com/users/GSPP","html_url":"https://github.com/GSPP","followers_url":"https://api.github.com/users/GSPP/followers","following_url":"https://api.github.com/users/GSPP/following{/other_user}","gists_url":"https://api.github.com/users/GSPP/gists{/gist_id}","starred_url":"https://api.github.com/users/GSPP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GSPP/subscriptions","organizations_url":"https://api.github.com/users/GSPP/orgs","repos_url":"https://api.github.com/users/GSPP/repos","events_url":"https://api.github.com/users/GSPP/events{/privacy}","received_events_url":"https://api.github.com/users/GSPP/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2016-04-08T20:16:13Z","updated_at":"2016-04-11T10:24:21Z","closed_at":null,"body":"In the commit logs I found\r\n\r\n    consensus.vDeployments[Consensus::DEPLOYMENT_CSV].nStartTime = 1456790400; // March 1st, 2016\r\n\r\nAs a (layman) reviewer I find it hard to ascertain how this integer constant came to be and whether it is correct. For all I know this could be a bug or a backdoor. IMHO this could be improved by calculating the constant at runtime in a more obviously correct way such as:\r\n\r\n    nStartTime = BLOCK_TIMESTAMP_FROM_DATE(2016, 3, 1);\r\n\r\nThis requires a suitable macro or preferrably a constexpr function.\r\n\r\nI would request that this improvement to the source code be made in the interest of reviewability."},"comment":{"url":"https://api.github.com/repos/bitcoin/bitcoin/issues/comments/208273362","html_url":"https://github.com/bitcoin/bitcoin/issues/7844#issuecomment-208273362","issue_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/7844","id":208273362,"user":{"login":"GSPP","id":12032350,"avatar_url":"https://avatars.githubusercontent.com/u/12032350?v=3","gravatar_id":"","url":"https://api.github.com/users/GSPP","html_url":"https://github.com/GSPP","followers_url":"https://api.github.com/users/GSPP/followers","following_url":"https://api.github.com/users/GSPP/following{/other_user}","gists_url":"https://api.github.com/users/GSPP/gists{/gist_id}","starred_url":"https://api.github.com/users/GSPP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GSPP/subscriptions","organizations_url":"https://api.github.com/users/GSPP/orgs","repos_url":"https://api.github.com/users/GSPP/repos","events_url":"https://api.github.com/users/GSPP/events{/privacy}","received_events_url":"https://api.github.com/users/GSPP/received_events","type":"User","site_admin":false},"created_at":"2016-04-11T10:24:21Z","updated_at":"2016-04-11T10:24:21Z","body":"Maybe the guy who ends up implementing this can implement it simultaneously for C, C# and Java so that a reference implementation exists that all Bitcoin projects can just use. The code should end up being almost identical in all languages. For C#, I recommend placing it in `checked { }`.\r\n\r\nThe implementations can be checked for conformance by writing test output line-wise to a text file and comparing the files."}}