{"action":"created","comment":{"url":"https://api.github.com/repos/ripple/rippled/pulls/comments/64778350","id":64778350,"diff_hunk":"@@ -0,0 +1,107 @@\n+//------------------------------------------------------------------------------\n+/*\n+    This file is part of rippled: https://github.com/ripple/rippled\n+    Copyright (c) 2012-2016 Ripple Labs Inc.\n+\n+    Permission to use, copy, modify, and/or distribute this software for any\n+    purpose  with  or without fee is hereby granted, provided that the above\n+    copyright notice and this permission notice appear in all copies.\n+\n+    THE  SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n+    WITH  REGARD  TO  THIS  SOFTWARE  INCLUDING  ALL  IMPLIED  WARRANTIES  OF\n+    MERCHANTABILITY  AND  FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\n+    ANY  SPECIAL ,  DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n+    WHATSOEVER  RESULTING  FROM  LOSS  OF USE, DATA OR PROFITS, WHETHER IN AN\n+    ACTION  OF  CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\n+    OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n+*/\n+//==============================================================================\n+\n+#include <BeastConfig.h>\n+#include <ripple/protocol/JsonFields.h>\n+#include <ripple/test/jtx.h>\n+#include <ripple/beast/unit_test.h>\n+\n+namespace ripple {\n+\n+namespace test {\n+\n+namespace validator {\n+static auto const seed = \"ss7t3J9dYentEFgKdPA3q6eyxtrLB\";\n+static auto const master_key =\n+    \"nHU4LxxrSQsRTKy5uZbX95eYowoamUEPCcWraxoiCNbtDaUr1V34\";\n+static auto const signing_key =\n+    \"n9LHPLA36SBky1YjbaVEApQQ3s9XcpazCgfAG7jsqBb1ugDAosbm\";\n+static auto const manifest =\n+    \"JAAAAAFxIe2FwblmJwz4pVYXHLJSzSBgIK7mpQuHNQ88CxW\"\n+    \"jIN7q4nMhAuUTyasIhvj2KPfNRbmmIBnqNUzidgkKb244eP\"\n+    \"794ZpMdkC+8l5n3R/CHP6SAwhYDOaqub0Cs2NjjewBnp1mf\"\n+    \"23rhAzdcjRuWzm0IT12eduZ0DwcF5Ng8rAelaYP1iT93ScE\";\n+static auto sequence = 1;\n+}\n+\n+class ServerInfo_test : public beast::unit_test::suite\n+{\n+public:\n+    static\n+    std::unique_ptr<Config>\n+    makeValidatorConfig()\n+    {\n+        auto p = std::make_unique<Config>();\n+        boost::format toLoad(R\"rippleConfig(\n+[validation_manifest]\n+%1%\n+\n+[validation_seed]\n+%2%\n+)rippleConfig\");\n+\n+        p->loadFromString (boost::str (\n+            toLoad % validator::manifest % validator::seed));\n+\n+        setupConfigForUnitTests(*p);\n+\n+        return p;\n+    }\n+\n+    void testServerInfo()\n+    {\n+        using namespace test::jtx;\n+\n+        {\n+            Env env(*this);\n+            auto const result = env.rpc(\"server_info\", \"1\");\n+            expect(!RPC::contains_error(result[jss::result]) &&\n+                result[jss::status] == \"success\" &&\n+                result[jss::result].isMember(jss::info));\n+        }\n+        {\n+            Env env(*this, makeValidatorConfig());\n+            auto const result = env.rpc(\"server_info\", \"1\");\n+            expect(!RPC::contains_error(result[jss::result]) &&\n+                result[jss::status] == \"success\" &&\n+                result[jss::result].isMember(jss::info) &&\n+                result[jss::result][jss::info]\n+                    [jss::pubkey_validator] == validator::signing_key &&\n+                result[jss::result][jss::info].isMember(\n+                    jss::validation_manifest) &&\n+                result[jss::result][jss::info][jss::validation_manifest]\n+                    [jss::master_key] == validator::master_key &&\n+                result[jss::result][jss::info][jss::validation_manifest]\n+                    [jss::signing_key] == validator::signing_key &&\n+                result[jss::result][jss::info][jss::validation_manifest]\n+                    [jss::seq] == validator::sequence);","path":"src/ripple/rpc/tests/ServerInfo.test.cpp","position":93,"original_position":93,"commit_id":"e8492a4778f86bb9c7f0bac69ecdba265b03cd63","original_commit_id":"e8492a4778f86bb9c7f0bac69ecdba265b03cd63","user":{"login":"vinniefalco","id":1503976,"avatar_url":"https://avatars.githubusercontent.com/u/1503976?v=3","gravatar_id":"","url":"https://api.github.com/users/vinniefalco","html_url":"https://github.com/vinniefalco","followers_url":"https://api.github.com/users/vinniefalco/followers","following_url":"https://api.github.com/users/vinniefalco/following{/other_user}","gists_url":"https://api.github.com/users/vinniefalco/gists{/gist_id}","starred_url":"https://api.github.com/users/vinniefalco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vinniefalco/subscriptions","organizations_url":"https://api.github.com/users/vinniefalco/orgs","repos_url":"https://api.github.com/users/vinniefalco/repos","events_url":"https://api.github.com/users/vinniefalco/events{/privacy}","received_events_url":"https://api.github.com/users/vinniefalco/received_events","type":"User","site_admin":false},"body":"@HowardHinnant Surely we can do better than this...","created_at":"2016-05-26T16:36:14Z","updated_at":"2016-05-26T16:36:14Z","html_url":"https://github.com/ripple/rippled/pull/1726#discussion_r64778350","pull_request_url":"https://api.github.com/repos/ripple/rippled/pulls/1726","_links":{"self":{"href":"https://api.github.com/repos/ripple/rippled/pulls/comments/64778350"},"html":{"href":"https://github.com/ripple/rippled/pull/1726#discussion_r64778350"},"pull_request":{"href":"https://api.github.com/repos/ripple/rippled/pulls/1726"}}},"pull_request":{"url":"https://api.github.com/repos/ripple/rippled/pulls/1726","id":71577755,"html_url":"https://github.com/ripple/rippled/pull/1726","diff_url":"https://github.com/ripple/rippled/pull/1726.diff","patch_url":"https://github.com/ripple/rippled/pull/1726.patch","issue_url":"https://api.github.com/repos/ripple/rippled/issues/1726","number":1726,"state":"open","locked":false,"title":"Include config manifest in server_info admin response (RIPD-1172)","user":{"login":"wilsonianb","id":5885521,"avatar_url":"https://avatars.githubusercontent.com/u/5885521?v=3","gravatar_id":"","url":"https://api.github.com/users/wilsonianb","html_url":"https://github.com/wilsonianb","followers_url":"https://api.github.com/users/wilsonianb/followers","following_url":"https://api.github.com/users/wilsonianb/following{/other_user}","gists_url":"https://api.github.com/users/wilsonianb/gists{/gist_id}","starred_url":"https://api.github.com/users/wilsonianb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wilsonianb/subscriptions","organizations_url":"https://api.github.com/users/wilsonianb/orgs","repos_url":"https://api.github.com/users/wilsonianb/repos","events_url":"https://api.github.com/users/wilsonianb/events{/privacy}","received_events_url":"https://api.github.com/users/wilsonianb/received_events","type":"User","site_admin":false},"body":"Reviewers: @seelabs @vinniefalco ","created_at":"2016-05-26T15:40:10Z","updated_at":"2016-05-26T16:36:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7f5d93961a0577f5cbea007bba8a047b97e607eb","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ripple/rippled/pulls/1726/commits","review_comments_url":"https://api.github.com/repos/ripple/rippled/pulls/1726/comments","review_comment_url":"https://api.github.com/repos/ripple/rippled/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ripple/rippled/issues/1726/comments","statuses_url":"https://api.github.com/repos/ripple/rippled/statuses/e8492a4778f86bb9c7f0bac69ecdba265b03cd63","head":{"label":"wilsonianb:server-info-manifest","ref":"server-info-manifest","sha":"e8492a4778f86bb9c7f0bac69ecdba265b03cd63","user":{"login":"wilsonianb","id":5885521,"avatar_url":"https://avatars.githubusercontent.com/u/5885521?v=3","gravatar_id":"","url":"https://api.github.com/users/wilsonianb","html_url":"https://github.com/wilsonianb","followers_url":"https://api.github.com/users/wilsonianb/followers","following_url":"https://api.github.com/users/wilsonianb/following{/other_user}","gists_url":"https://api.github.com/users/wilsonianb/gists{/gist_id}","starred_url":"https://api.github.com/users/wilsonianb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wilsonianb/subscriptions","organizations_url":"https://api.github.com/users/wilsonianb/orgs","repos_url":"https://api.github.com/users/wilsonianb/repos","events_url":"https://api.github.com/users/wilsonianb/events{/privacy}","received_events_url":"https://api.github.com/users/wilsonianb/received_events","type":"User","site_admin":false},"repo":{"id":16365871,"name":"rippled","full_name":"wilsonianb/rippled","owner":{"login":"wilsonianb","id":5885521,"avatar_url":"https://avatars.githubusercontent.com/u/5885521?v=3","gravatar_id":"","url":"https://api.github.com/users/wilsonianb","html_url":"https://github.com/wilsonianb","followers_url":"https://api.github.com/users/wilsonianb/followers","following_url":"https://api.github.com/users/wilsonianb/following{/other_user}","gists_url":"https://api.github.com/users/wilsonianb/gists{/gist_id}","starred_url":"https://api.github.com/users/wilsonianb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wilsonianb/subscriptions","organizations_url":"https://api.github.com/users/wilsonianb/orgs","repos_url":"https://api.github.com/users/wilsonianb/repos","events_url":"https://api.github.com/users/wilsonianb/events{/privacy}","received_events_url":"https://api.github.com/users/wilsonianb/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wilsonianb/rippled","description":"Ripple peer-to-peer network daemon","fork":true,"url":"https://api.github.com/repos/wilsonianb/rippled","forks_url":"https://api.github.com/repos/wilsonianb/rippled/forks","keys_url":"https://api.github.com/repos/wilsonianb/rippled/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wilsonianb/rippled/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wilsonianb/rippled/teams","hooks_url":"https://api.github.com/repos/wilsonianb/rippled/hooks","issue_events_url":"https://api.github.com/repos/wilsonianb/rippled/issues/events{/number}","events_url":"https://api.github.com/repos/wilsonianb/rippled/events","assignees_url":"https://api.github.com/repos/wilsonianb/rippled/assignees{/user}","branches_url":"https://api.github.com/repos/wilsonianb/rippled/branches{/branch}","tags_url":"https://api.github.com/repos/wilsonianb/rippled/tags","blobs_url":"https://api.github.com/repos/wilsonianb/rippled/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wilsonianb/rippled/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wilsonianb/rippled/git/refs{/sha}","trees_url":"https://api.github.com/repos/wilsonianb/rippled/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wilsonianb/rippled/statuses/{sha}","languages_url":"https://api.github.com/repos/wilsonianb/rippled/languages","stargazers_url":"https://api.github.com/repos/wilsonianb/rippled/stargazers","contributors_url":"https://api.github.com/repos/wilsonianb/rippled/contributors","subscribers_url":"https://api.github.com/repos/wilsonianb/rippled/subscribers","subscription_url":"https://api.github.com/repos/wilsonianb/rippled/subscription","commits_url":"https://api.github.com/repos/wilsonianb/rippled/commits{/sha}","git_commits_url":"https://api.github.com/repos/wilsonianb/rippled/git/commits{/sha}","comments_url":"https://api.github.com/repos/wilsonianb/rippled/comments{/number}","issue_comment_url":"https://api.github.com/repos/wilsonianb/rippled/issues/comments{/number}","contents_url":"https://api.github.com/repos/wilsonianb/rippled/contents/{+path}","compare_url":"https://api.github.com/repos/wilsonianb/rippled/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wilsonianb/rippled/merges","archive_url":"https://api.github.com/repos/wilsonianb/rippled/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wilsonianb/rippled/downloads","issues_url":"https://api.github.com/repos/wilsonianb/rippled/issues{/number}","pulls_url":"https://api.github.com/repos/wilsonianb/rippled/pulls{/number}","milestones_url":"https://api.github.com/repos/wilsonianb/rippled/milestones{/number}","notifications_url":"https://api.github.com/repos/wilsonianb/rippled/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wilsonianb/rippled/labels{/name}","releases_url":"https://api.github.com/repos/wilsonianb/rippled/releases{/id}","deployments_url":"https://api.github.com/repos/wilsonianb/rippled/deployments","created_at":"2014-01-30T01:59:42Z","updated_at":"2015-05-27T17:06:13Z","pushed_at":"2016-05-26T15:32:42Z","git_url":"git://github.com/wilsonianb/rippled.git","ssh_url":"git@github.com:wilsonianb/rippled.git","clone_url":"https://github.com/wilsonianb/rippled.git","svn_url":"https://github.com/wilsonianb/rippled","homepage":"https://ripple.com","size":114550,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"ripple:develop","ref":"develop","sha":"1fe983948fee4e0e398e76432ced6954eb073161","user":{"login":"ripple","id":3165523,"avatar_url":"https://avatars.githubusercontent.com/u/3165523?v=3","gravatar_id":"","url":"https://api.github.com/users/ripple","html_url":"https://github.com/ripple","followers_url":"https://api.github.com/users/ripple/followers","following_url":"https://api.github.com/users/ripple/following{/other_user}","gists_url":"https://api.github.com/users/ripple/gists{/gist_id}","starred_url":"https://api.github.com/users/ripple/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ripple/subscriptions","organizations_url":"https://api.github.com/users/ripple/orgs","repos_url":"https://api.github.com/users/ripple/repos","events_url":"https://api.github.com/users/ripple/events{/privacy}","received_events_url":"https://api.github.com/users/ripple/received_events","type":"Organization","site_admin":false},"repo":{"id":2724167,"name":"rippled","full_name":"ripple/rippled","owner":{"login":"ripple","id":3165523,"avatar_url":"https://avatars.githubusercontent.com/u/3165523?v=3","gravatar_id":"","url":"https://api.github.com/users/ripple","html_url":"https://github.com/ripple","followers_url":"https://api.github.com/users/ripple/followers","following_url":"https://api.github.com/users/ripple/following{/other_user}","gists_url":"https://api.github.com/users/ripple/gists{/gist_id}","starred_url":"https://api.github.com/users/ripple/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ripple/subscriptions","organizations_url":"https://api.github.com/users/ripple/orgs","repos_url":"https://api.github.com/users/ripple/repos","events_url":"https://api.github.com/users/ripple/events{/privacy}","received_events_url":"https://api.github.com/users/ripple/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ripple/rippled","description":"Ripple peer-to-peer network daemon","fork":false,"url":"https://api.github.com/repos/ripple/rippled","forks_url":"https://api.github.com/repos/ripple/rippled/forks","keys_url":"https://api.github.com/repos/ripple/rippled/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ripple/rippled/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ripple/rippled/teams","hooks_url":"https://api.github.com/repos/ripple/rippled/hooks","issue_events_url":"https://api.github.com/repos/ripple/rippled/issues/events{/number}","events_url":"https://api.github.com/repos/ripple/rippled/events","assignees_url":"https://api.github.com/repos/ripple/rippled/assignees{/user}","branches_url":"https://api.github.com/repos/ripple/rippled/branches{/branch}","tags_url":"https://api.github.com/repos/ripple/rippled/tags","blobs_url":"https://api.github.com/repos/ripple/rippled/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ripple/rippled/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ripple/rippled/git/refs{/sha}","trees_url":"https://api.github.com/repos/ripple/rippled/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ripple/rippled/statuses/{sha}","languages_url":"https://api.github.com/repos/ripple/rippled/languages","stargazers_url":"https://api.github.com/repos/ripple/rippled/stargazers","contributors_url":"https://api.github.com/repos/ripple/rippled/contributors","subscribers_url":"https://api.github.com/repos/ripple/rippled/subscribers","subscription_url":"https://api.github.com/repos/ripple/rippled/subscription","commits_url":"https://api.github.com/repos/ripple/rippled/commits{/sha}","git_commits_url":"https://api.github.com/repos/ripple/rippled/git/commits{/sha}","comments_url":"https://api.github.com/repos/ripple/rippled/comments{/number}","issue_comment_url":"https://api.github.com/repos/ripple/rippled/issues/comments{/number}","contents_url":"https://api.github.com/repos/ripple/rippled/contents/{+path}","compare_url":"https://api.github.com/repos/ripple/rippled/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ripple/rippled/merges","archive_url":"https://api.github.com/repos/ripple/rippled/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ripple/rippled/downloads","issues_url":"https://api.github.com/repos/ripple/rippled/issues{/number}","pulls_url":"https://api.github.com/repos/ripple/rippled/pulls{/number}","milestones_url":"https://api.github.com/repos/ripple/rippled/milestones{/number}","notifications_url":"https://api.github.com/repos/ripple/rippled/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ripple/rippled/labels{/name}","releases_url":"https://api.github.com/repos/ripple/rippled/releases{/id}","deployments_url":"https://api.github.com/repos/ripple/rippled/deployments","created_at":"2011-11-07T04:40:15Z","updated_at":"2016-05-25T16:34:10Z","pushed_at":"2016-05-26T16:34:01Z","git_url":"git://github.com/ripple/rippled.git","ssh_url":"git@github.com:ripple/rippled.git","clone_url":"https://github.com/ripple/rippled.git","svn_url":"https://github.com/ripple/rippled","homepage":"https://ripple.com","size":112902,"stargazers_count":1096,"watchers_count":1096,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":333,"mirror_url":null,"open_issues_count":121,"forks":333,"open_issues":121,"watchers":1096,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/ripple/rippled/pulls/1726"},"html":{"href":"https://github.com/ripple/rippled/pull/1726"},"issue":{"href":"https://api.github.com/repos/ripple/rippled/issues/1726"},"comments":{"href":"https://api.github.com/repos/ripple/rippled/issues/1726/comments"},"review_comments":{"href":"https://api.github.com/repos/ripple/rippled/pulls/1726/comments"},"review_comment":{"href":"https://api.github.com/repos/ripple/rippled/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ripple/rippled/pulls/1726/commits"},"statuses":{"href":"https://api.github.com/repos/ripple/rippled/statuses/e8492a4778f86bb9c7f0bac69ecdba265b03cd63"}}}}
{"actor":{"display_login":"vinniefalco"}}