{"action":"created","comment":{"url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/comments/151087235","pull_request_review_id":76736257,"id":151087235,"diff_hunk":"@@ -694,6 +708,15 @@ UniValue dumpwallet(const JSONRPCRequest& request)\n         }\n     }\n     file << \"\\n\";\n+    for (const CScriptID &scriptid : scripts) {\n+        CScript script;\n+        std::string address = EncodeDestination(scriptid);\n+        if(pwallet->GetCScript(scriptid, script)) {\n+            file << strprintf(\"%s 0 script=1\", HexStr(script.begin(), script.end()));\n+            file << strprintf(\" # addr=%s\\n\", address);","path":"src/wallet/rpcdump.cpp","position":121,"original_position":121,"commit_id":"1e066dbdf731265a443329bf883f6c21f5aca243","original_commit_id":"1e066dbdf731265a443329bf883f6c21f5aca243","user":{"login":"promag","id":3534524,"avatar_url":"https://avatars1.githubusercontent.com/u/3534524?v=4","gravatar_id":"","url":"https://api.github.com/users/promag","html_url":"https://github.com/promag","followers_url":"https://api.github.com/users/promag/followers","following_url":"https://api.github.com/users/promag/following{/other_user}","gists_url":"https://api.github.com/users/promag/gists{/gist_id}","starred_url":"https://api.github.com/users/promag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/promag/subscriptions","organizations_url":"https://api.github.com/users/promag/orgs","repos_url":"https://api.github.com/users/promag/repos","events_url":"https://api.github.com/users/promag/events{/privacy}","received_events_url":"https://api.github.com/users/promag/received_events","type":"User","site_admin":false},"body":"We don't test the comment?","created_at":"2017-11-15T10:27:20Z","updated_at":"2017-11-15T10:30:15Z","html_url":"https://github.com/bitcoin/bitcoin/pull/11667#discussion_r151087235","pull_request_url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/11667","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/comments/151087235"},"html":{"href":"https://github.com/bitcoin/bitcoin/pull/11667#discussion_r151087235"},"pull_request":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/11667"}}},"pull_request":{"url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/11667","id":152090639,"html_url":"https://github.com/bitcoin/bitcoin/pull/11667","diff_url":"https://github.com/bitcoin/bitcoin/pull/11667.diff","patch_url":"https://github.com/bitcoin/bitcoin/pull/11667.patch","issue_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/11667","number":11667,"state":"open","locked":false,"title":"Add scripts to dumpwallet RPC","user":{"login":"MeshCollider","id":3211283,"avatar_url":"https://avatars2.githubusercontent.com/u/3211283?v=4","gravatar_id":"","url":"https://api.github.com/users/MeshCollider","html_url":"https://github.com/MeshCollider","followers_url":"https://api.github.com/users/MeshCollider/followers","following_url":"https://api.github.com/users/MeshCollider/following{/other_user}","gists_url":"https://api.github.com/users/MeshCollider/gists{/gist_id}","starred_url":"https://api.github.com/users/MeshCollider/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MeshCollider/subscriptions","organizations_url":"https://api.github.com/users/MeshCollider/orgs","repos_url":"https://api.github.com/users/MeshCollider/repos","events_url":"https://api.github.com/users/MeshCollider/events{/privacy}","received_events_url":"https://api.github.com/users/MeshCollider/received_events","type":"User","site_admin":false},"body":"As discussed in https://github.com/bitcoin/bitcoin/pull/11289#issuecomment-334600457, adds the CScripts from the wallet to the `dumpwallet` RPC and then allows them to be imported with the `importwallet` RPC. Includes a basic test, and modifies the helptext of the dumpwallet RPC.\r\n\r\nNotes:\r\n- Reviewers: use `?w=1` to avoid the indentation-only change in commit `Add scripts to importwallet RPC `\r\n- currently the scripts are followed with `# addr=` comments just as the other keys are, unsure if this might confuse users into thinking all the scripts are for valid P2SH addresses though, but I don't think that should be an issue.\r\n- there are no birthtimes for scripts, so script imports don't affect rescans\r\n- `importwallet` imports the CScripts but I'm not sure how to approach specifying whether scripts are for P2SH addresses, BIP173 addresses, etc. whether that matters or not. Otherwise the RPC helptext might just need modification.","created_at":"2017-11-12T06:07:45Z","updated_at":"2017-11-15T10:30:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"29985e7bbccc35a25fde83ec1523063625c34d88","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/11667/commits","review_comments_url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/11667/comments","review_comment_url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/11667/comments","statuses_url":"https://api.github.com/repos/bitcoin/bitcoin/statuses/1e066dbdf731265a443329bf883f6c21f5aca243","head":{"label":"MeshCollider:201710_dumpwallet_scripts","ref":"201710_dumpwallet_scripts","sha":"1e066dbdf731265a443329bf883f6c21f5aca243","user":{"login":"MeshCollider","id":3211283,"avatar_url":"https://avatars2.githubusercontent.com/u/3211283?v=4","gravatar_id":"","url":"https://api.github.com/users/MeshCollider","html_url":"https://github.com/MeshCollider","followers_url":"https://api.github.com/users/MeshCollider/followers","following_url":"https://api.github.com/users/MeshCollider/following{/other_user}","gists_url":"https://api.github.com/users/MeshCollider/gists{/gist_id}","starred_url":"https://api.github.com/users/MeshCollider/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MeshCollider/subscriptions","organizations_url":"https://api.github.com/users/MeshCollider/orgs","repos_url":"https://api.github.com/users/MeshCollider/repos","events_url":"https://api.github.com/users/MeshCollider/events{/privacy}","received_events_url":"https://api.github.com/users/MeshCollider/received_events","type":"User","site_admin":false},"repo":{"id":95521135,"name":"bitcoin","full_name":"MeshCollider/bitcoin","owner":{"login":"MeshCollider","id":3211283,"avatar_url":"https://avatars2.githubusercontent.com/u/3211283?v=4","gravatar_id":"","url":"https://api.github.com/users/MeshCollider","html_url":"https://github.com/MeshCollider","followers_url":"https://api.github.com/users/MeshCollider/followers","following_url":"https://api.github.com/users/MeshCollider/following{/other_user}","gists_url":"https://api.github.com/users/MeshCollider/gists{/gist_id}","starred_url":"https://api.github.com/users/MeshCollider/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MeshCollider/subscriptions","organizations_url":"https://api.github.com/users/MeshCollider/orgs","repos_url":"https://api.github.com/users/MeshCollider/repos","events_url":"https://api.github.com/users/MeshCollider/events{/privacy}","received_events_url":"https://api.github.com/users/MeshCollider/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MeshCollider/bitcoin","description":"Bitcoin (Don't fork from here, fork from bitcoin/bitcoin)","fork":true,"url":"https://api.github.com/repos/MeshCollider/bitcoin","forks_url":"https://api.github.com/repos/MeshCollider/bitcoin/forks","keys_url":"https://api.github.com/repos/MeshCollider/bitcoin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MeshCollider/bitcoin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MeshCollider/bitcoin/teams","hooks_url":"https://api.github.com/repos/MeshCollider/bitcoin/hooks","issue_events_url":"https://api.github.com/repos/MeshCollider/bitcoin/issues/events{/number}","events_url":"https://api.github.com/repos/MeshCollider/bitcoin/events","assignees_url":"https://api.github.com/repos/MeshCollider/bitcoin/assignees{/user}","branches_url":"https://api.github.com/repos/MeshCollider/bitcoin/branches{/branch}","tags_url":"https://api.github.com/repos/MeshCollider/bitcoin/tags","blobs_url":"https://api.github.com/repos/MeshCollider/bitcoin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MeshCollider/bitcoin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MeshCollider/bitcoin/git/refs{/sha}","trees_url":"https://api.github.com/repos/MeshCollider/bitcoin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MeshCollider/bitcoin/statuses/{sha}","languages_url":"https://api.github.com/repos/MeshCollider/bitcoin/languages","stargazers_url":"https://api.github.com/repos/MeshCollider/bitcoin/stargazers","contributors_url":"https://api.github.com/repos/MeshCollider/bitcoin/contributors","subscribers_url":"https://api.github.com/repos/MeshCollider/bitcoin/subscribers","subscription_url":"https://api.github.com/repos/MeshCollider/bitcoin/subscription","commits_url":"https://api.github.com/repos/MeshCollider/bitcoin/commits{/sha}","git_commits_url":"https://api.github.com/repos/MeshCollider/bitcoin/git/commits{/sha}","comments_url":"https://api.github.com/repos/MeshCollider/bitcoin/comments{/number}","issue_comment_url":"https://api.github.com/repos/MeshCollider/bitcoin/issues/comments{/number}","contents_url":"https://api.github.com/repos/MeshCollider/bitcoin/contents/{+path}","compare_url":"https://api.github.com/repos/MeshCollider/bitcoin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MeshCollider/bitcoin/merges","archive_url":"https://api.github.com/repos/MeshCollider/bitcoin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MeshCollider/bitcoin/downloads","issues_url":"https://api.github.com/repos/MeshCollider/bitcoin/issues{/number}","pulls_url":"https://api.github.com/repos/MeshCollider/bitcoin/pulls{/number}","milestones_url":"https://api.github.com/repos/MeshCollider/bitcoin/milestones{/number}","notifications_url":"https://api.github.com/repos/MeshCollider/bitcoin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MeshCollider/bitcoin/labels{/name}","releases_url":"https://api.github.com/repos/MeshCollider/bitcoin/releases{/id}","deployments_url":"https://api.github.com/repos/MeshCollider/bitcoin/deployments","created_at":"2017-06-27T05:33:42Z","updated_at":"2017-07-13T09:39:18Z","pushed_at":"2017-11-15T09:48:20Z","git_url":"git://github.com/MeshCollider/bitcoin.git","ssh_url":"git@github.com:MeshCollider/bitcoin.git","clone_url":"https://github.com/MeshCollider/bitcoin.git","svn_url":"https://github.com/MeshCollider/bitcoin","homepage":"https://bitcoin.org/en/download","size":89557,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"bitcoin:master","ref":"master","sha":"2adbddb03840ad71e843c6c4a207a13e871cd1d4","user":{"login":"bitcoin","id":528860,"avatar_url":"https://avatars2.githubusercontent.com/u/528860?v=4","gravatar_id":"","url":"https://api.github.com/users/bitcoin","html_url":"https://github.com/bitcoin","followers_url":"https://api.github.com/users/bitcoin/followers","following_url":"https://api.github.com/users/bitcoin/following{/other_user}","gists_url":"https://api.github.com/users/bitcoin/gists{/gist_id}","starred_url":"https://api.github.com/users/bitcoin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bitcoin/subscriptions","organizations_url":"https://api.github.com/users/bitcoin/orgs","repos_url":"https://api.github.com/users/bitcoin/repos","events_url":"https://api.github.com/users/bitcoin/events{/privacy}","received_events_url":"https://api.github.com/users/bitcoin/received_events","type":"Organization","site_admin":false},"repo":{"id":1181927,"name":"bitcoin","full_name":"bitcoin/bitcoin","owner":{"login":"bitcoin","id":528860,"avatar_url":"https://avatars2.githubusercontent.com/u/528860?v=4","gravatar_id":"","url":"https://api.github.com/users/bitcoin","html_url":"https://github.com/bitcoin","followers_url":"https://api.github.com/users/bitcoin/followers","following_url":"https://api.github.com/users/bitcoin/following{/other_user}","gists_url":"https://api.github.com/users/bitcoin/gists{/gist_id}","starred_url":"https://api.github.com/users/bitcoin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bitcoin/subscriptions","organizations_url":"https://api.github.com/users/bitcoin/orgs","repos_url":"https://api.github.com/users/bitcoin/repos","events_url":"https://api.github.com/users/bitcoin/events{/privacy}","received_events_url":"https://api.github.com/users/bitcoin/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bitcoin/bitcoin","description":"Bitcoin Core integration/staging tree","fork":false,"url":"https://api.github.com/repos/bitcoin/bitcoin","forks_url":"https://api.github.com/repos/bitcoin/bitcoin/forks","keys_url":"https://api.github.com/repos/bitcoin/bitcoin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bitcoin/bitcoin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bitcoin/bitcoin/teams","hooks_url":"https://api.github.com/repos/bitcoin/bitcoin/hooks","issue_events_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/events{/number}","events_url":"https://api.github.com/repos/bitcoin/bitcoin/events","assignees_url":"https://api.github.com/repos/bitcoin/bitcoin/assignees{/user}","branches_url":"https://api.github.com/repos/bitcoin/bitcoin/branches{/branch}","tags_url":"https://api.github.com/repos/bitcoin/bitcoin/tags","blobs_url":"https://api.github.com/repos/bitcoin/bitcoin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bitcoin/bitcoin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bitcoin/bitcoin/git/refs{/sha}","trees_url":"https://api.github.com/repos/bitcoin/bitcoin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bitcoin/bitcoin/statuses/{sha}","languages_url":"https://api.github.com/repos/bitcoin/bitcoin/languages","stargazers_url":"https://api.github.com/repos/bitcoin/bitcoin/stargazers","contributors_url":"https://api.github.com/repos/bitcoin/bitcoin/contributors","subscribers_url":"https://api.github.com/repos/bitcoin/bitcoin/subscribers","subscription_url":"https://api.github.com/repos/bitcoin/bitcoin/subscription","commits_url":"https://api.github.com/repos/bitcoin/bitcoin/commits{/sha}","git_commits_url":"https://api.github.com/repos/bitcoin/bitcoin/git/commits{/sha}","comments_url":"https://api.github.com/repos/bitcoin/bitcoin/comments{/number}","issue_comment_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/comments{/number}","contents_url":"https://api.github.com/repos/bitcoin/bitcoin/contents/{+path}","compare_url":"https://api.github.com/repos/bitcoin/bitcoin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bitcoin/bitcoin/merges","archive_url":"https://api.github.com/repos/bitcoin/bitcoin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bitcoin/bitcoin/downloads","issues_url":"https://api.github.com/repos/bitcoin/bitcoin/issues{/number}","pulls_url":"https://api.github.com/repos/bitcoin/bitcoin/pulls{/number}","milestones_url":"https://api.github.com/repos/bitcoin/bitcoin/milestones{/number}","notifications_url":"https://api.github.com/repos/bitcoin/bitcoin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bitcoin/bitcoin/labels{/name}","releases_url":"https://api.github.com/repos/bitcoin/bitcoin/releases{/id}","deployments_url":"https://api.github.com/repos/bitcoin/bitcoin/deployments","created_at":"2010-12-19T15:16:43Z","updated_at":"2017-11-15T10:23:13Z","pushed_at":"2017-11-15T10:11:20Z","git_url":"git://github.com/bitcoin/bitcoin.git","ssh_url":"git@github.com:bitcoin/bitcoin.git","clone_url":"https://github.com/bitcoin/bitcoin.git","svn_url":"https://github.com/bitcoin/bitcoin","homepage":"https://bitcoin.org/en/download","size":89484,"stargazers_count":19162,"watchers_count":19162,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":11366,"mirror_url":null,"archived":false,"open_issues_count":751,"forks":11366,"open_issues":751,"watchers":19162,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/11667"},"html":{"href":"https://github.com/bitcoin/bitcoin/pull/11667"},"issue":{"href":"https://api.github.com/repos/bitcoin/bitcoin/issues/11667"},"comments":{"href":"https://api.github.com/repos/bitcoin/bitcoin/issues/11667/comments"},"review_comments":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/11667/comments"},"review_comment":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/11667/commits"},"statuses":{"href":"https://api.github.com/repos/bitcoin/bitcoin/statuses/1e066dbdf731265a443329bf883f6c21f5aca243"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"promag"}}