{"action":"created","comment":{"url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/comments/101032423","pull_request_review_id":21750040,"id":101032423,"diff_hunk":"@@ -572,7 +576,9 @@ UniValue dumpwallet(const JSONRPCRequest& request)\n     EnsureWalletIsUnlocked();\n \n     ofstream file;\n-    file.open(request.params[0].get_str().c_str());\n+    boost::filesystem::path filepath = request.params[0].get_str();\n+    filepath = absolute(filepath);","path":"src/wallet/rpcdump.cpp","position":19,"original_position":19,"commit_id":"48abaeae39c0485f864dd67cc4a2fcac977bbdc3","original_commit_id":"48abaeae39c0485f864dd67cc4a2fcac977bbdc3","user":{"login":"laanwj","id":126646,"avatar_url":"https://avatars.githubusercontent.com/u/126646?v=3","gravatar_id":"","url":"https://api.github.com/users/laanwj","html_url":"https://github.com/laanwj","followers_url":"https://api.github.com/users/laanwj/followers","following_url":"https://api.github.com/users/laanwj/following{/other_user}","gists_url":"https://api.github.com/users/laanwj/gists{/gist_id}","starred_url":"https://api.github.com/users/laanwj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laanwj/subscriptions","organizations_url":"https://api.github.com/users/laanwj/orgs","repos_url":"https://api.github.com/users/laanwj/repos","events_url":"https://api.github.com/users/laanwj/events{/privacy}","received_events_url":"https://api.github.com/users/laanwj/received_events","type":"User","site_admin":false},"body":"> Maybe an absolute path or if not, relative to the data-dir? If possible?\r\n\r\nGood idea. It's our (effective) convention for command line arguments as well. I think it would be good to `chdir` the daemon to the data directory at start. This also avoids issues with the daemon holding on to resources (e.g. the starting directory could be deleted later) discussed in #8278.\r\n\r\n>  RPC may even be called on a different machine\r\n\r\nA way to dump the wallet over the network could be useful. The practical problem is that there is currently no way to do streaming writes to the network from RPC code, so the entire wallet would have to be dumped in memory, which would result in huge memory and parsing/generating overhead. I looked at streaming to the HTTP in a different context here: #7759.\r\n\r\nAlso yes there's a bit of a security concern though it's no different from dumpprivkey and friends...\r\n","created_at":"2017-02-14T13:22:16Z","updated_at":"2017-02-14T13:22:16Z","html_url":"https://github.com/bitcoin/bitcoin/pull/9740#discussion_r101032423","pull_request_url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/9740","_links":{"self":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/comments/101032423"},"html":{"href":"https://github.com/bitcoin/bitcoin/pull/9740#discussion_r101032423"},"pull_request":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/9740"}}},"pull_request":{"url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/9740","id":105743075,"html_url":"https://github.com/bitcoin/bitcoin/pull/9740","diff_url":"https://github.com/bitcoin/bitcoin/pull/9740.diff","patch_url":"https://github.com/bitcoin/bitcoin/pull/9740.patch","issue_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/9740","number":9740,"state":"open","locked":false,"title":"Add friendly output to dumpwallet","user":{"login":"aideca","id":5959514,"avatar_url":"https://avatars.githubusercontent.com/u/5959514?v=3","gravatar_id":"","url":"https://api.github.com/users/aideca","html_url":"https://github.com/aideca","followers_url":"https://api.github.com/users/aideca/followers","following_url":"https://api.github.com/users/aideca/following{/other_user}","gists_url":"https://api.github.com/users/aideca/gists{/gist_id}","starred_url":"https://api.github.com/users/aideca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aideca/subscriptions","organizations_url":"https://api.github.com/users/aideca/orgs","repos_url":"https://api.github.com/users/aideca/repos","events_url":"https://api.github.com/users/aideca/events{/privacy}","received_events_url":"https://api.github.com/users/aideca/received_events","type":"User","site_admin":false},"body":"Add friendly output to dumpwallet #9564.\r\n\r\n* Add help message.\r\n* Show created dumpfile path.\r\n* Add rpc test.","created_at":"2017-02-11T05:47:29Z","updated_at":"2017-02-14T13:22:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1faa1472931d90427da28e1463001fd2b4cfbbf8","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/9740/commits","review_comments_url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/9740/comments","review_comment_url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/9740/comments","statuses_url":"https://api.github.com/repos/bitcoin/bitcoin/statuses/48abaeae39c0485f864dd67cc4a2fcac977bbdc3","head":{"label":"aideca:dumpwallet","ref":"dumpwallet","sha":"48abaeae39c0485f864dd67cc4a2fcac977bbdc3","user":{"login":"aideca","id":5959514,"avatar_url":"https://avatars.githubusercontent.com/u/5959514?v=3","gravatar_id":"","url":"https://api.github.com/users/aideca","html_url":"https://github.com/aideca","followers_url":"https://api.github.com/users/aideca/followers","following_url":"https://api.github.com/users/aideca/following{/other_user}","gists_url":"https://api.github.com/users/aideca/gists{/gist_id}","starred_url":"https://api.github.com/users/aideca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aideca/subscriptions","organizations_url":"https://api.github.com/users/aideca/orgs","repos_url":"https://api.github.com/users/aideca/repos","events_url":"https://api.github.com/users/aideca/events{/privacy}","received_events_url":"https://api.github.com/users/aideca/received_events","type":"User","site_admin":false},"repo":{"id":81564242,"name":"bitcoin","full_name":"aideca/bitcoin","owner":{"login":"aideca","id":5959514,"avatar_url":"https://avatars.githubusercontent.com/u/5959514?v=3","gravatar_id":"","url":"https://api.github.com/users/aideca","html_url":"https://github.com/aideca","followers_url":"https://api.github.com/users/aideca/followers","following_url":"https://api.github.com/users/aideca/following{/other_user}","gists_url":"https://api.github.com/users/aideca/gists{/gist_id}","starred_url":"https://api.github.com/users/aideca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aideca/subscriptions","organizations_url":"https://api.github.com/users/aideca/orgs","repos_url":"https://api.github.com/users/aideca/repos","events_url":"https://api.github.com/users/aideca/events{/privacy}","received_events_url":"https://api.github.com/users/aideca/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/aideca/bitcoin","description":"Bitcoin Core integration/staging tree","fork":true,"url":"https://api.github.com/repos/aideca/bitcoin","forks_url":"https://api.github.com/repos/aideca/bitcoin/forks","keys_url":"https://api.github.com/repos/aideca/bitcoin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aideca/bitcoin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aideca/bitcoin/teams","hooks_url":"https://api.github.com/repos/aideca/bitcoin/hooks","issue_events_url":"https://api.github.com/repos/aideca/bitcoin/issues/events{/number}","events_url":"https://api.github.com/repos/aideca/bitcoin/events","assignees_url":"https://api.github.com/repos/aideca/bitcoin/assignees{/user}","branches_url":"https://api.github.com/repos/aideca/bitcoin/branches{/branch}","tags_url":"https://api.github.com/repos/aideca/bitcoin/tags","blobs_url":"https://api.github.com/repos/aideca/bitcoin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aideca/bitcoin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aideca/bitcoin/git/refs{/sha}","trees_url":"https://api.github.com/repos/aideca/bitcoin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aideca/bitcoin/statuses/{sha}","languages_url":"https://api.github.com/repos/aideca/bitcoin/languages","stargazers_url":"https://api.github.com/repos/aideca/bitcoin/stargazers","contributors_url":"https://api.github.com/repos/aideca/bitcoin/contributors","subscribers_url":"https://api.github.com/repos/aideca/bitcoin/subscribers","subscription_url":"https://api.github.com/repos/aideca/bitcoin/subscription","commits_url":"https://api.github.com/repos/aideca/bitcoin/commits{/sha}","git_commits_url":"https://api.github.com/repos/aideca/bitcoin/git/commits{/sha}","comments_url":"https://api.github.com/repos/aideca/bitcoin/comments{/number}","issue_comment_url":"https://api.github.com/repos/aideca/bitcoin/issues/comments{/number}","contents_url":"https://api.github.com/repos/aideca/bitcoin/contents/{+path}","compare_url":"https://api.github.com/repos/aideca/bitcoin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aideca/bitcoin/merges","archive_url":"https://api.github.com/repos/aideca/bitcoin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aideca/bitcoin/downloads","issues_url":"https://api.github.com/repos/aideca/bitcoin/issues{/number}","pulls_url":"https://api.github.com/repos/aideca/bitcoin/pulls{/number}","milestones_url":"https://api.github.com/repos/aideca/bitcoin/milestones{/number}","notifications_url":"https://api.github.com/repos/aideca/bitcoin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aideca/bitcoin/labels{/name}","releases_url":"https://api.github.com/repos/aideca/bitcoin/releases{/id}","deployments_url":"https://api.github.com/repos/aideca/bitcoin/deployments","created_at":"2017-02-10T12:41:33Z","updated_at":"2017-02-10T12:41:48Z","pushed_at":"2017-02-11T05:46:08Z","git_url":"git://github.com/aideca/bitcoin.git","ssh_url":"git@github.com:aideca/bitcoin.git","clone_url":"https://github.com/aideca/bitcoin.git","svn_url":"https://github.com/aideca/bitcoin","homepage":"https://bitcoin.org/en/download","size":77841,"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":"bitcoin:master","ref":"master","sha":"a06ede9a138d0fb86b0de17c42b936d9fe6e2158","user":{"login":"bitcoin","id":528860,"avatar_url":"https://avatars.githubusercontent.com/u/528860?v=3","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://avatars.githubusercontent.com/u/528860?v=3","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-02-14T11:08:46Z","pushed_at":"2017-02-14T12:51:07Z","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":78295,"stargazers_count":11364,"watchers_count":11364,"language":"C++","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":7399,"mirror_url":null,"open_issues_count":615,"forks":7399,"open_issues":615,"watchers":11364,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/9740"},"html":{"href":"https://github.com/bitcoin/bitcoin/pull/9740"},"issue":{"href":"https://api.github.com/repos/bitcoin/bitcoin/issues/9740"},"comments":{"href":"https://api.github.com/repos/bitcoin/bitcoin/issues/9740/comments"},"review_comments":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/9740/comments"},"review_comment":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/9740/commits"},"statuses":{"href":"https://api.github.com/repos/bitcoin/bitcoin/statuses/48abaeae39c0485f864dd67cc4a2fcac977bbdc3"}}}}
{"actor":{"display_login":"laanwj"}}