{"action":"created","comment":{"url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/comments/143730935","pull_request_review_id":68284055,"id":143730935,"diff_hunk":"@@ -2626,17 +2626,16 @@ UniValue listwallets(const JSONRPCRequest& request)\n             \"Returns a list of currently loaded wallets.\\n\"\n             \"For full information on the wallet, use \\\"getwalletinfo\\\"\\n\"\n             \"\\nResult:\\n\"\n-            \"[                         (json array of strings)\\n\"\n-            \"  \\\"walletname\\\"            (string) the wallet name\\n\"\n-            \"   ...\\n\"\n-            \"]\\n\"\n+            \"{\\n\"","path":"src/wallet/rpcwallet.cpp","position":8,"original_position":8,"commit_id":"ead92c2d0310dcba68c44d7d0b5830ef34248ac6","original_commit_id":"f8dc7acb8c4776b8a68b91a03487313a7c92e862","user":{"login":"ryanofsky","id":7133040,"avatar_url":"https://avatars2.githubusercontent.com/u/7133040?v=4","gravatar_id":"","url":"https://api.github.com/users/ryanofsky","html_url":"https://github.com/ryanofsky","followers_url":"https://api.github.com/users/ryanofsky/followers","following_url":"https://api.github.com/users/ryanofsky/following{/other_user}","gists_url":"https://api.github.com/users/ryanofsky/gists{/gist_id}","starred_url":"https://api.github.com/users/ryanofsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryanofsky/subscriptions","organizations_url":"https://api.github.com/users/ryanofsky/orgs","repos_url":"https://api.github.com/users/ryanofsky/repos","events_url":"https://api.github.com/users/ryanofsky/events{/privacy}","received_events_url":"https://api.github.com/users/ryanofsky/received_events","type":"User","site_admin":false},"body":"> If you or anyone has a better idea for finding wallets then that would be ok\r\n\r\nYou could look for berkeleydb magic bytes to at least filter out files which can't be bdb databases:\r\n\r\nhttps://github.com/file/file/blob/master/magic/Magdir/database","created_at":"2017-10-10T13:43:04Z","updated_at":"2017-10-10T13:43:04Z","html_url":"https://github.com/bitcoin/bitcoin/pull/11466#discussion_r143730935","pull_request_url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/11466","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/comments/143730935"},"html":{"href":"https://github.com/bitcoin/bitcoin/pull/11466#discussion_r143730935"},"pull_request":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/11466"}},"in_reply_to_id":143428584},"pull_request":{"url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/11466","id":145412031,"html_url":"https://github.com/bitcoin/bitcoin/pull/11466","diff_url":"https://github.com/bitcoin/bitcoin/pull/11466.diff","patch_url":"https://github.com/bitcoin/bitcoin/pull/11466.patch","issue_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/11466","number":11466,"state":"open","locked":false,"title":"[WIP] Specify custom wallet directory with -walletdir param","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":"Closes #11348 \r\n\r\nAdds a `-walletdir` parameter which specifies a directory to use for wallets, allowing them to be stored separately from the 'main' data directory.\r\n\r\nAlso modifies `listwallets` to return a list of 'available' wallets in the wallet directory. Currently if the default data directory is in use, it returns all .dat files there including peers, banlist, etc. which might need to be changed, feedback would be good. Is there a better way to know if something is a wallet rather than just checking for `*.dat`? Because I think it would be worse to perform some weird check to only list available files if the directory isnt the default\r\n\r\nTo-do:\r\n- [ ] Cleanup by removing caching of data directory paths and instead just initialise them once on startup? (c.f. #3073)\r\n- [ ] Create a new `wallets/` directory in datadir if this is the first time running\r\n- [x] Add release notes\r\n- [x] Add tests\r\n\r\nI think the two things left go hand in hand, somewhere in the program initialisation the checks for existing directories would be made, and if the data directory doesn't exist and no `-walletdir` is specified it would create both at once (this way it knows it's a fresh install).","created_at":"2017-10-09T09:55:29Z","updated_at":"2017-10-10T13:43:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"352cfd6e4882abbbaf249f3d4b4a9ac84200c032","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/11466/commits","review_comments_url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/11466/comments","review_comment_url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/11466/comments","statuses_url":"https://api.github.com/repos/bitcoin/bitcoin/statuses/ead92c2d0310dcba68c44d7d0b5830ef34248ac6","head":{"label":"MeshCollider:201710_walletdir","ref":"201710_walletdir","sha":"ead92c2d0310dcba68c44d7d0b5830ef34248ac6","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-10-10T06:01:59Z","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":87717,"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,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"bitcoin:master","ref":"master","sha":"e022463a4b238750476430d08b45bc9171791e6f","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-10-10T12:45:36Z","pushed_at":"2017-10-10T13:14:03Z","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":87920,"stargazers_count":17350,"watchers_count":17350,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":10579,"mirror_url":null,"open_issues_count":751,"forks":10579,"open_issues":751,"watchers":17350,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/11466"},"html":{"href":"https://github.com/bitcoin/bitcoin/pull/11466"},"issue":{"href":"https://api.github.com/repos/bitcoin/bitcoin/issues/11466"},"comments":{"href":"https://api.github.com/repos/bitcoin/bitcoin/issues/11466/comments"},"review_comments":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/11466/comments"},"review_comment":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/11466/commits"},"statuses":{"href":"https://api.github.com/repos/bitcoin/bitcoin/statuses/ead92c2d0310dcba68c44d7d0b5830ef34248ac6"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"ryanofsky"}}