{"action":"created","comment":{"url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/comments/188361847","pull_request_review_id":120324771,"id":188361847,"diff_hunk":"@@ -2994,6 +2994,51 @@ static UniValue listwallets(const JSONRPCRequest& request)\n     return obj;\n }\n \n+UniValue loadwallet(const JSONRPCRequest& request)\n+{\n+    if (request.fHelp || request.params.size() != 1)\n+        throw std::runtime_error(\n+            \"loadwallet \\\"filename\\\"\\n\"\n+            \"\\nLoads a wallet from a wallet file or directory.\"\n+            \"\\nNote that all wallet command-line options used when starting bitcoind will be\"\n+            \"\\napplied to the new wallet (eg -zapwallettxes, upgradewallet, rescan, etc).\\n\"\n+            \"\\nArguments:\\n\"\n+            \"1. \\\"filename\\\"    (string, required) The wallet directory or .dat file.\\n\"\n+            \"\\nResult:\\n\"\n+            \"{\\n\"\n+            \"  \\\"name\\\" : <wallet_name>,        (string) The wallet name if loaded successfully.\\n\"\n+            \"}\\n\"\n+            \"\\nExamples:\\n\"\n+            + HelpExampleCli(\"loadwallet\", \"\\\"test.dat\\\"\")\n+            + HelpExampleRpc(\"loadwallet\", \"\\\"test.dat\\\"\")\n+        );\n+    std::string wallet_file = request.params[0].get_str();\n+    std::string error;\n+\n+    fs::path wallet_path = fs::absolute(wallet_file, GetWalletDir());\n+    if (fs::symlink_status(wallet_path).type() == fs::file_not_found) {\n+        throw JSONRPCError(RPC_WALLET_NOT_FOUND, \"Wallet \" + wallet_file + \" not found.\");\n+    }\n+\n+    std::string dummy_warning;","path":"src/wallet/rpcwallet.cpp","position":30,"original_position":30,"commit_id":"5ef858bfed2438746db0ba096ff3c98755603cb8","original_commit_id":"b2f8378e2a38b5adbcbaae9e87e3398434f7c14c","user":{"login":"jnewbery","id":1063656,"avatar_url":"https://avatars3.githubusercontent.com/u/1063656?v=4","gravatar_id":"","url":"https://api.github.com/users/jnewbery","html_url":"https://github.com/jnewbery","followers_url":"https://api.github.com/users/jnewbery/followers","following_url":"https://api.github.com/users/jnewbery/following{/other_user}","gists_url":"https://api.github.com/users/jnewbery/gists{/gist_id}","starred_url":"https://api.github.com/users/jnewbery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jnewbery/subscriptions","organizations_url":"https://api.github.com/users/jnewbery/orgs","repos_url":"https://api.github.com/users/jnewbery/repos","events_url":"https://api.github.com/users/jnewbery/events{/privacy}","received_events_url":"https://api.github.com/users/jnewbery/received_events","type":"User","site_admin":false},"body":"ok, added to the JSON response.","created_at":"2018-05-15T16:56:59Z","updated_at":"2018-05-15T16:56:59Z","html_url":"https://github.com/bitcoin/bitcoin/pull/10740#discussion_r188361847","pull_request_url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/10740","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/comments/188361847"},"html":{"href":"https://github.com/bitcoin/bitcoin/pull/10740#discussion_r188361847"},"pull_request":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/10740"}},"in_reply_to_id":187179940},"pull_request":{"url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/10740","id":128814169,"html_url":"https://github.com/bitcoin/bitcoin/pull/10740","diff_url":"https://github.com/bitcoin/bitcoin/pull/10740.diff","patch_url":"https://github.com/bitcoin/bitcoin/pull/10740.patch","issue_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/10740","number":10740,"state":"open","locked":false,"title":"[wallet] `loadwallet` RPC - load wallet at runtime","user":{"login":"jnewbery","id":1063656,"avatar_url":"https://avatars3.githubusercontent.com/u/1063656?v=4","gravatar_id":"","url":"https://api.github.com/users/jnewbery","html_url":"https://github.com/jnewbery","followers_url":"https://api.github.com/users/jnewbery/followers","following_url":"https://api.github.com/users/jnewbery/following{/other_user}","gists_url":"https://api.github.com/users/jnewbery/gists{/gist_id}","starred_url":"https://api.github.com/users/jnewbery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jnewbery/subscriptions","organizations_url":"https://api.github.com/users/jnewbery/orgs","repos_url":"https://api.github.com/users/jnewbery/repos","events_url":"https://api.github.com/users/jnewbery/events{/privacy}","received_events_url":"https://api.github.com/users/jnewbery/received_events","type":"User","site_admin":false},"body":"Adds a `loadwallet` RPCs. This allows wallets to be loaded dynamically during runtime without having to stop-start the node with new `-wallet` params.\r\n\r\nIncludes functional tests and release notes.\r\n\r\nLimitations:\r\n\r\n- currently this functionality is only available through the RPC interface.\r\n- wallets loaded in this way will not be displayed in the GUI.","created_at":"2017-07-04T14:24:10Z","updated_at":"2018-05-15T16:56:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"689e80af69a6a04c61787589ce3c1ccee477e751","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":149424,"url":"https://api.github.com/repos/bitcoin/bitcoin/labels/Wallet","name":"Wallet","color":"08a781","default":false}],"milestone":{"url":"https://api.github.com/repos/bitcoin/bitcoin/milestones/33","html_url":"https://github.com/bitcoin/bitcoin/milestone/33","labels_url":"https://api.github.com/repos/bitcoin/bitcoin/milestones/33/labels","id":2931889,"number":33,"title":"0.17.0","description":"","creator":{"login":"MarcoFalke","id":6399679,"avatar_url":"https://avatars0.githubusercontent.com/u/6399679?v=4","gravatar_id":"","url":"https://api.github.com/users/MarcoFalke","html_url":"https://github.com/MarcoFalke","followers_url":"https://api.github.com/users/MarcoFalke/followers","following_url":"https://api.github.com/users/MarcoFalke/following{/other_user}","gists_url":"https://api.github.com/users/MarcoFalke/gists{/gist_id}","starred_url":"https://api.github.com/users/MarcoFalke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarcoFalke/subscriptions","organizations_url":"https://api.github.com/users/MarcoFalke/orgs","repos_url":"https://api.github.com/users/MarcoFalke/repos","events_url":"https://api.github.com/users/MarcoFalke/events{/privacy}","received_events_url":"https://api.github.com/users/MarcoFalke/received_events","type":"User","site_admin":false},"open_issues":17,"closed_issues":25,"state":"open","created_at":"2017-11-22T18:54:09Z","updated_at":"2018-05-03T15:46:18Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/10740/commits","review_comments_url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/10740/comments","review_comment_url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/10740/comments","statuses_url":"https://api.github.com/repos/bitcoin/bitcoin/statuses/5ef858bfed2438746db0ba096ff3c98755603cb8","head":{"label":"jnewbery:load_unload_wallet","ref":"load_unload_wallet","sha":"5ef858bfed2438746db0ba096ff3c98755603cb8","user":{"login":"jnewbery","id":1063656,"avatar_url":"https://avatars3.githubusercontent.com/u/1063656?v=4","gravatar_id":"","url":"https://api.github.com/users/jnewbery","html_url":"https://github.com/jnewbery","followers_url":"https://api.github.com/users/jnewbery/followers","following_url":"https://api.github.com/users/jnewbery/following{/other_user}","gists_url":"https://api.github.com/users/jnewbery/gists{/gist_id}","starred_url":"https://api.github.com/users/jnewbery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jnewbery/subscriptions","organizations_url":"https://api.github.com/users/jnewbery/orgs","repos_url":"https://api.github.com/users/jnewbery/repos","events_url":"https://api.github.com/users/jnewbery/events{/privacy}","received_events_url":"https://api.github.com/users/jnewbery/received_events","type":"User","site_admin":false},"repo":{"id":68248485,"name":"bitcoin","full_name":"jnewbery/bitcoin","owner":{"login":"jnewbery","id":1063656,"avatar_url":"https://avatars3.githubusercontent.com/u/1063656?v=4","gravatar_id":"","url":"https://api.github.com/users/jnewbery","html_url":"https://github.com/jnewbery","followers_url":"https://api.github.com/users/jnewbery/followers","following_url":"https://api.github.com/users/jnewbery/following{/other_user}","gists_url":"https://api.github.com/users/jnewbery/gists{/gist_id}","starred_url":"https://api.github.com/users/jnewbery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jnewbery/subscriptions","organizations_url":"https://api.github.com/users/jnewbery/orgs","repos_url":"https://api.github.com/users/jnewbery/repos","events_url":"https://api.github.com/users/jnewbery/events{/privacy}","received_events_url":"https://api.github.com/users/jnewbery/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jnewbery/bitcoin","description":"Bitcoin Core integration/staging tree","fork":true,"url":"https://api.github.com/repos/jnewbery/bitcoin","forks_url":"https://api.github.com/repos/jnewbery/bitcoin/forks","keys_url":"https://api.github.com/repos/jnewbery/bitcoin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jnewbery/bitcoin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jnewbery/bitcoin/teams","hooks_url":"https://api.github.com/repos/jnewbery/bitcoin/hooks","issue_events_url":"https://api.github.com/repos/jnewbery/bitcoin/issues/events{/number}","events_url":"https://api.github.com/repos/jnewbery/bitcoin/events","assignees_url":"https://api.github.com/repos/jnewbery/bitcoin/assignees{/user}","branches_url":"https://api.github.com/repos/jnewbery/bitcoin/branches{/branch}","tags_url":"https://api.github.com/repos/jnewbery/bitcoin/tags","blobs_url":"https://api.github.com/repos/jnewbery/bitcoin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jnewbery/bitcoin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jnewbery/bitcoin/git/refs{/sha}","trees_url":"https://api.github.com/repos/jnewbery/bitcoin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jnewbery/bitcoin/statuses/{sha}","languages_url":"https://api.github.com/repos/jnewbery/bitcoin/languages","stargazers_url":"https://api.github.com/repos/jnewbery/bitcoin/stargazers","contributors_url":"https://api.github.com/repos/jnewbery/bitcoin/contributors","subscribers_url":"https://api.github.com/repos/jnewbery/bitcoin/subscribers","subscription_url":"https://api.github.com/repos/jnewbery/bitcoin/subscription","commits_url":"https://api.github.com/repos/jnewbery/bitcoin/commits{/sha}","git_commits_url":"https://api.github.com/repos/jnewbery/bitcoin/git/commits{/sha}","comments_url":"https://api.github.com/repos/jnewbery/bitcoin/comments{/number}","issue_comment_url":"https://api.github.com/repos/jnewbery/bitcoin/issues/comments{/number}","contents_url":"https://api.github.com/repos/jnewbery/bitcoin/contents/{+path}","compare_url":"https://api.github.com/repos/jnewbery/bitcoin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jnewbery/bitcoin/merges","archive_url":"https://api.github.com/repos/jnewbery/bitcoin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jnewbery/bitcoin/downloads","issues_url":"https://api.github.com/repos/jnewbery/bitcoin/issues{/number}","pulls_url":"https://api.github.com/repos/jnewbery/bitcoin/pulls{/number}","milestones_url":"https://api.github.com/repos/jnewbery/bitcoin/milestones{/number}","notifications_url":"https://api.github.com/repos/jnewbery/bitcoin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jnewbery/bitcoin/labels{/name}","releases_url":"https://api.github.com/repos/jnewbery/bitcoin/releases{/id}","deployments_url":"https://api.github.com/repos/jnewbery/bitcoin/deployments","created_at":"2016-09-14T22:29:05Z","updated_at":"2016-09-14T22:29:18Z","pushed_at":"2018-05-14T15:42:41Z","git_url":"git://github.com/jnewbery/bitcoin.git","ssh_url":"git@github.com:jnewbery/bitcoin.git","clone_url":"https://github.com/jnewbery/bitcoin.git","svn_url":"https://github.com/jnewbery/bitcoin","homepage":"https://bitcoin.org/en/download","size":110194,"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":1,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"bitcoin:master","ref":"master","sha":"08c1caf863656e8c4302f0ff392772f0055760e5","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":"2018-05-15T16:52:29Z","pushed_at":"2018-05-15T15:11:51Z","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":105448,"stargazers_count":31473,"watchers_count":31473,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":18918,"mirror_url":null,"archived":false,"open_issues_count":778,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":18918,"open_issues":778,"watchers":31473,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/10740"},"html":{"href":"https://github.com/bitcoin/bitcoin/pull/10740"},"issue":{"href":"https://api.github.com/repos/bitcoin/bitcoin/issues/10740"},"comments":{"href":"https://api.github.com/repos/bitcoin/bitcoin/issues/10740/comments"},"review_comments":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/10740/comments"},"review_comment":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bitcoin/bitcoin/pulls/10740/commits"},"statuses":{"href":"https://api.github.com/repos/bitcoin/bitcoin/statuses/5ef858bfed2438746db0ba096ff3c98755603cb8"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"jnewbery"}}