{"action":"created","comment":{"url":"https://api.github.com/repos/sipa/bitcoin/pulls/comments/50638138","id":50638138,"diff_hunk":"@@ -69,7 +69,7 @@ struct ECCryptoClosure\n ECCryptoClosure instance_of_eccryptoclosure;\n }\n \n-int bitcoinconsensus_verify_script(const unsigned char *scriptPubKey, unsigned int scriptPubKeyLen, uint64_t amount,\n+int bitcoinconsensus__verify_script(const unsigned char *scriptPubKey, unsigned int scriptPubKeyLen, CAmount amount,","path":"src/script/bitcoinconsensus.cpp","position":5,"original_position":5,"commit_id":"177658242745e85071d4bbf519227f05ae7b3b0d","original_commit_id":"177658242745e85071d4bbf519227f05ae7b3b0d","user":{"login":"afk11","id":5617245,"avatar_url":"https://avatars.githubusercontent.com/u/5617245?v=3","gravatar_id":"","url":"https://api.github.com/users/afk11","html_url":"https://github.com/afk11","followers_url":"https://api.github.com/users/afk11/followers","following_url":"https://api.github.com/users/afk11/following{/other_user}","gists_url":"https://api.github.com/users/afk11/gists{/gist_id}","starred_url":"https://api.github.com/users/afk11/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/afk11/subscriptions","organizations_url":"https://api.github.com/users/afk11/orgs","repos_url":"https://api.github.com/users/afk11/repos","events_url":"https://api.github.com/users/afk11/events{/privacy}","received_events_url":"https://api.github.com/users/afk11/received_events","type":"User","site_admin":false},"body":"Meant to mention that; it can be anything, I just don't think it should be exposed via the API. ","created_at":"2016-01-24T16:53:14Z","updated_at":"2016-01-24T16:53:14Z","html_url":"https://github.com/sipa/bitcoin/pull/47#discussion_r50638138","pull_request_url":"https://api.github.com/repos/sipa/bitcoin/pulls/47","_links":{"self":{"href":"https://api.github.com/repos/sipa/bitcoin/pulls/comments/50638138"},"html":{"href":"https://github.com/sipa/bitcoin/pull/47#discussion_r50638138"},"pull_request":{"href":"https://api.github.com/repos/sipa/bitcoin/pulls/47"}}},"pull_request":{"url":"https://api.github.com/repos/sipa/bitcoin/pulls/47","id":57007481,"html_url":"https://github.com/sipa/bitcoin/pull/47","diff_url":"https://github.com/sipa/bitcoin/pull/47.diff","patch_url":"https://github.com/sipa/bitcoin/pull/47.patch","issue_url":"https://api.github.com/repos/sipa/bitcoin/issues/47","number":47,"state":"open","locked":false,"title":"RFC: bitcoinconsensus.h: Introduce new function to accept UTXO amount","user":{"login":"afk11","id":5617245,"avatar_url":"https://avatars.githubusercontent.com/u/5617245?v=3","gravatar_id":"","url":"https://api.github.com/users/afk11","html_url":"https://github.com/afk11","followers_url":"https://api.github.com/users/afk11/followers","following_url":"https://api.github.com/users/afk11/following{/other_user}","gists_url":"https://api.github.com/users/afk11/gists{/gist_id}","starred_url":"https://api.github.com/users/afk11/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/afk11/subscriptions","organizations_url":"https://api.github.com/users/afk11/orgs","repos_url":"https://api.github.com/users/afk11/repos","events_url":"https://api.github.com/users/afk11/events{/privacy}","received_events_url":"https://api.github.com/users/afk11/received_events","type":"User","site_admin":false},"body":"This adds an error bitcoinconsensus_ERR_AMOUNT_REQUIRED, when bitcoinconsensus_verify_script is called with the witness bit set. Normal usage will feed the amount 0 into VerifyScript.\r\n\r\nAdds `bitcoinconsensus_verify_with_amount()`, which takes the usual arguments and the amount. \r\n\r\nTo facilitate future changes, I've added a function not exposed in the interface to accept all parameters and flags. Also bumps the version constant (exposed via bitcoinconsensus_version())\r\n\r\nI modified a test which touched this function also:\r\n  - if the witness flag is set, only `bitcoinconsensus_verify_script_with_amount()` is called. \r\n  - Otherwise, we test both methods - passing a value of zero as the amount since the old sighash algorithm will be used. ","created_at":"2016-01-24T16:45:02Z","updated_at":"2016-01-24T16:53:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b6b6c1002ad4346bac7ebb7acb5ce433bafb8618","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sipa/bitcoin/pulls/47/commits","review_comments_url":"https://api.github.com/repos/sipa/bitcoin/pulls/47/comments","review_comment_url":"https://api.github.com/repos/sipa/bitcoin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sipa/bitcoin/issues/47/comments","statuses_url":"https://api.github.com/repos/sipa/bitcoin/statuses/177658242745e85071d4bbf519227f05ae7b3b0d","head":{"label":"afk11:libbitcoinconsensus","ref":"libbitcoinconsensus","sha":"177658242745e85071d4bbf519227f05ae7b3b0d","user":{"login":"afk11","id":5617245,"avatar_url":"https://avatars.githubusercontent.com/u/5617245?v=3","gravatar_id":"","url":"https://api.github.com/users/afk11","html_url":"https://github.com/afk11","followers_url":"https://api.github.com/users/afk11/followers","following_url":"https://api.github.com/users/afk11/following{/other_user}","gists_url":"https://api.github.com/users/afk11/gists{/gist_id}","starred_url":"https://api.github.com/users/afk11/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/afk11/subscriptions","organizations_url":"https://api.github.com/users/afk11/orgs","repos_url":"https://api.github.com/users/afk11/repos","events_url":"https://api.github.com/users/afk11/events{/privacy}","received_events_url":"https://api.github.com/users/afk11/received_events","type":"User","site_admin":false},"repo":{"id":39785982,"name":"bitcoin","full_name":"afk11/bitcoin","owner":{"login":"afk11","id":5617245,"avatar_url":"https://avatars.githubusercontent.com/u/5617245?v=3","gravatar_id":"","url":"https://api.github.com/users/afk11","html_url":"https://github.com/afk11","followers_url":"https://api.github.com/users/afk11/followers","following_url":"https://api.github.com/users/afk11/following{/other_user}","gists_url":"https://api.github.com/users/afk11/gists{/gist_id}","starred_url":"https://api.github.com/users/afk11/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/afk11/subscriptions","organizations_url":"https://api.github.com/users/afk11/orgs","repos_url":"https://api.github.com/users/afk11/repos","events_url":"https://api.github.com/users/afk11/events{/privacy}","received_events_url":"https://api.github.com/users/afk11/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/afk11/bitcoin","description":"Bitcoin Core integration/staging tree","fork":true,"url":"https://api.github.com/repos/afk11/bitcoin","forks_url":"https://api.github.com/repos/afk11/bitcoin/forks","keys_url":"https://api.github.com/repos/afk11/bitcoin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/afk11/bitcoin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/afk11/bitcoin/teams","hooks_url":"https://api.github.com/repos/afk11/bitcoin/hooks","issue_events_url":"https://api.github.com/repos/afk11/bitcoin/issues/events{/number}","events_url":"https://api.github.com/repos/afk11/bitcoin/events","assignees_url":"https://api.github.com/repos/afk11/bitcoin/assignees{/user}","branches_url":"https://api.github.com/repos/afk11/bitcoin/branches{/branch}","tags_url":"https://api.github.com/repos/afk11/bitcoin/tags","blobs_url":"https://api.github.com/repos/afk11/bitcoin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/afk11/bitcoin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/afk11/bitcoin/git/refs{/sha}","trees_url":"https://api.github.com/repos/afk11/bitcoin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/afk11/bitcoin/statuses/{sha}","languages_url":"https://api.github.com/repos/afk11/bitcoin/languages","stargazers_url":"https://api.github.com/repos/afk11/bitcoin/stargazers","contributors_url":"https://api.github.com/repos/afk11/bitcoin/contributors","subscribers_url":"https://api.github.com/repos/afk11/bitcoin/subscribers","subscription_url":"https://api.github.com/repos/afk11/bitcoin/subscription","commits_url":"https://api.github.com/repos/afk11/bitcoin/commits{/sha}","git_commits_url":"https://api.github.com/repos/afk11/bitcoin/git/commits{/sha}","comments_url":"https://api.github.com/repos/afk11/bitcoin/comments{/number}","issue_comment_url":"https://api.github.com/repos/afk11/bitcoin/issues/comments{/number}","contents_url":"https://api.github.com/repos/afk11/bitcoin/contents/{+path}","compare_url":"https://api.github.com/repos/afk11/bitcoin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/afk11/bitcoin/merges","archive_url":"https://api.github.com/repos/afk11/bitcoin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/afk11/bitcoin/downloads","issues_url":"https://api.github.com/repos/afk11/bitcoin/issues{/number}","pulls_url":"https://api.github.com/repos/afk11/bitcoin/pulls{/number}","milestones_url":"https://api.github.com/repos/afk11/bitcoin/milestones{/number}","notifications_url":"https://api.github.com/repos/afk11/bitcoin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/afk11/bitcoin/labels{/name}","releases_url":"https://api.github.com/repos/afk11/bitcoin/releases{/id}","deployments_url":"https://api.github.com/repos/afk11/bitcoin/deployments","created_at":"2015-07-27T16:44:28Z","updated_at":"2015-07-27T16:44:37Z","pushed_at":"2016-01-24T16:44:01Z","git_url":"git://github.com/afk11/bitcoin.git","ssh_url":"git@github.com:afk11/bitcoin.git","clone_url":"https://github.com/afk11/bitcoin.git","svn_url":"https://github.com/afk11/bitcoin","homepage":"https://bitcoin.org/en/download","size":62746,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"sipa:segwit","ref":"segwit","sha":"82f323e68928e9a0a3ba0511f6fff3749bed5e5c","user":{"login":"sipa","id":548488,"avatar_url":"https://avatars.githubusercontent.com/u/548488?v=3","gravatar_id":"","url":"https://api.github.com/users/sipa","html_url":"https://github.com/sipa","followers_url":"https://api.github.com/users/sipa/followers","following_url":"https://api.github.com/users/sipa/following{/other_user}","gists_url":"https://api.github.com/users/sipa/gists{/gist_id}","starred_url":"https://api.github.com/users/sipa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sipa/subscriptions","organizations_url":"https://api.github.com/users/sipa/orgs","repos_url":"https://api.github.com/users/sipa/repos","events_url":"https://api.github.com/users/sipa/events{/privacy}","received_events_url":"https://api.github.com/users/sipa/received_events","type":"User","site_admin":false},"repo":{"id":1458655,"name":"bitcoin","full_name":"sipa/bitcoin","owner":{"login":"sipa","id":548488,"avatar_url":"https://avatars.githubusercontent.com/u/548488?v=3","gravatar_id":"","url":"https://api.github.com/users/sipa","html_url":"https://github.com/sipa","followers_url":"https://api.github.com/users/sipa/followers","following_url":"https://api.github.com/users/sipa/following{/other_user}","gists_url":"https://api.github.com/users/sipa/gists{/gist_id}","starred_url":"https://api.github.com/users/sipa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sipa/subscriptions","organizations_url":"https://api.github.com/users/sipa/orgs","repos_url":"https://api.github.com/users/sipa/repos","events_url":"https://api.github.com/users/sipa/events{/privacy}","received_events_url":"https://api.github.com/users/sipa/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sipa/bitcoin","description":"Bitcoin integration/staging tree","fork":true,"url":"https://api.github.com/repos/sipa/bitcoin","forks_url":"https://api.github.com/repos/sipa/bitcoin/forks","keys_url":"https://api.github.com/repos/sipa/bitcoin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sipa/bitcoin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sipa/bitcoin/teams","hooks_url":"https://api.github.com/repos/sipa/bitcoin/hooks","issue_events_url":"https://api.github.com/repos/sipa/bitcoin/issues/events{/number}","events_url":"https://api.github.com/repos/sipa/bitcoin/events","assignees_url":"https://api.github.com/repos/sipa/bitcoin/assignees{/user}","branches_url":"https://api.github.com/repos/sipa/bitcoin/branches{/branch}","tags_url":"https://api.github.com/repos/sipa/bitcoin/tags","blobs_url":"https://api.github.com/repos/sipa/bitcoin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sipa/bitcoin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sipa/bitcoin/git/refs{/sha}","trees_url":"https://api.github.com/repos/sipa/bitcoin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sipa/bitcoin/statuses/{sha}","languages_url":"https://api.github.com/repos/sipa/bitcoin/languages","stargazers_url":"https://api.github.com/repos/sipa/bitcoin/stargazers","contributors_url":"https://api.github.com/repos/sipa/bitcoin/contributors","subscribers_url":"https://api.github.com/repos/sipa/bitcoin/subscribers","subscription_url":"https://api.github.com/repos/sipa/bitcoin/subscription","commits_url":"https://api.github.com/repos/sipa/bitcoin/commits{/sha}","git_commits_url":"https://api.github.com/repos/sipa/bitcoin/git/commits{/sha}","comments_url":"https://api.github.com/repos/sipa/bitcoin/comments{/number}","issue_comment_url":"https://api.github.com/repos/sipa/bitcoin/issues/comments{/number}","contents_url":"https://api.github.com/repos/sipa/bitcoin/contents/{+path}","compare_url":"https://api.github.com/repos/sipa/bitcoin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sipa/bitcoin/merges","archive_url":"https://api.github.com/repos/sipa/bitcoin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sipa/bitcoin/downloads","issues_url":"https://api.github.com/repos/sipa/bitcoin/issues{/number}","pulls_url":"https://api.github.com/repos/sipa/bitcoin/pulls{/number}","milestones_url":"https://api.github.com/repos/sipa/bitcoin/milestones{/number}","notifications_url":"https://api.github.com/repos/sipa/bitcoin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sipa/bitcoin/labels{/name}","releases_url":"https://api.github.com/repos/sipa/bitcoin/releases{/id}","deployments_url":"https://api.github.com/repos/sipa/bitcoin/deployments","created_at":"2011-03-09T10:46:59Z","updated_at":"2016-01-22T22:19:17Z","pushed_at":"2016-01-24T16:45:03Z","git_url":"git://github.com/sipa/bitcoin.git","ssh_url":"git@github.com:sipa/bitcoin.git","clone_url":"https://github.com/sipa/bitcoin.git","svn_url":"https://github.com/sipa/bitcoin","homepage":"http://www.bitcoin.org","size":63206,"stargazers_count":37,"watchers_count":37,"language":"TypeScript","has_issues":false,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":11,"forks":6,"open_issues":11,"watchers":37,"default_branch":"lows"}},"_links":{"self":{"href":"https://api.github.com/repos/sipa/bitcoin/pulls/47"},"html":{"href":"https://github.com/sipa/bitcoin/pull/47"},"issue":{"href":"https://api.github.com/repos/sipa/bitcoin/issues/47"},"comments":{"href":"https://api.github.com/repos/sipa/bitcoin/issues/47/comments"},"review_comments":{"href":"https://api.github.com/repos/sipa/bitcoin/pulls/47/comments"},"review_comment":{"href":"https://api.github.com/repos/sipa/bitcoin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sipa/bitcoin/pulls/47/commits"},"statuses":{"href":"https://api.github.com/repos/sipa/bitcoin/statuses/177658242745e85071d4bbf519227f05ae7b3b0d"}}}}