{"action":"created","comment":{"url":"https://api.github.com/repos/ripple/rippled/pulls/comments/30361854","id":30361854,"diff_hunk":"@@ -0,0 +1,123 @@\n+var async       = require(\"async\");\n+var assert      = require('assert');\n+var lodash       = require('lodash');\n+var Amount      = require(\"ripple-lib\").Amount;\n+var Remote      = require(\"ripple-lib\").Remote;\n+var Transaction = require(\"ripple-lib\").Transaction;\n+var Server      = require(\"./server\").Server;\n+var testutils   = require(\"./testutils\");\n+var config      = testutils.init_config();\n+\n+suite('Ledger requests', function() {\n+  var $ = { };\n+  var expectedledgers = [\n+    {\"ledger\":{\"accepted\":true,\"account_hash\":\"A21ED30C04C88046FC61DB9DC19375EEDBD365FD8C17286F27127DF804E9CAA6\",\"closed\":true,\"ledger_index\":\"1\",\"seqNum\":\"1\",\"totalCoins\":\"100000000000000000\",\"total_coins\":\"100000000000000000\",\"transaction_hash\":\"0000000000000000000000000000000000000000000000000000000000000000\"},\"ledger_index\":1,\"validated\":true},","path":"test/ledger.js","position":14,"original_position":14,"commit_id":"cbaf26c70ee4b2fe73209de50b7ac8c32dfb4421","original_commit_id":"cbaf26c70ee4b2fe73209de50b7ac8c32dfb4421","user":{"login":"rec","id":253362,"avatar_url":"https://avatars.githubusercontent.com/u/253362?v=3","gravatar_id":"","url":"https://api.github.com/users/rec","html_url":"https://github.com/rec","followers_url":"https://api.github.com/users/rec/followers","following_url":"https://api.github.com/users/rec/following{/other_user}","gists_url":"https://api.github.com/users/rec/gists{/gist_id}","starred_url":"https://api.github.com/users/rec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rec/subscriptions","organizations_url":"https://api.github.com/users/rec/orgs","repos_url":"https://api.github.com/users/rec/repos","events_url":"https://api.github.com/users/rec/events{/privacy}","received_events_url":"https://api.github.com/users/rec/received_events","type":"User","site_admin":false},"body":"(Also, consider spaces after `,`, `:`","created_at":"2015-05-14T20:55:42Z","updated_at":"2015-05-14T20:55:42Z","html_url":"https://github.com/ripple/rippled/pull/1047#discussion_r30361854","pull_request_url":"https://api.github.com/repos/ripple/rippled/pulls/1047","_links":{"self":{"href":"https://api.github.com/repos/ripple/rippled/pulls/comments/30361854"},"html":{"href":"https://github.com/ripple/rippled/pull/1047#discussion_r30361854"},"pull_request":{"href":"https://api.github.com/repos/ripple/rippled/pulls/1047"}}},"pull_request":{"url":"https://api.github.com/repos/ripple/rippled/pulls/1047","id":35446146,"html_url":"https://github.com/ripple/rippled/pull/1047","diff_url":"https://github.com/ripple/rippled/pull/1047.diff","patch_url":"https://github.com/ripple/rippled/pull/1047.patch","issue_url":"https://api.github.com/repos/ripple/rippled/issues/1047","number":1047,"state":"open","locked":false,"title":"Integration test to validate the WS ledger results.","user":{"login":"ximinez","id":6757714,"avatar_url":"https://avatars.githubusercontent.com/u/6757714?v=3","gravatar_id":"","url":"https://api.github.com/users/ximinez","html_url":"https://github.com/ximinez","followers_url":"https://api.github.com/users/ximinez/followers","following_url":"https://api.github.com/users/ximinez/following{/other_user}","gists_url":"https://api.github.com/users/ximinez/gists{/gist_id}","starred_url":"https://api.github.com/users/ximinez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ximinez/subscriptions","organizations_url":"https://api.github.com/users/ximinez/orgs","repos_url":"https://api.github.com/users/ximinez/repos","events_url":"https://api.github.com/users/ximinez/events{/privacy}","received_events_url":"https://api.github.com/users/ximinez/received_events","type":"User","site_admin":false},"body":"* Also replace a couple of magic values with the relevant Tuning param.\r\n\r\nThough this test was inspired by #1045, it doesn't exercise the scenario that is addressed. This is because standalone mode sets up a validated ledger. I still think the test has value because we don't have any other tests that explicitly exercise lookups, or validate ledger request results. Feel free to disagree.\r\n\r\n(And a C++ unit test isn't feasible, because the `Application` is not sufficiently initialized to call in to the relevant `NetworkOPs` functions.)\r\n\r\nReviewers: @miguelportilla @rec ","created_at":"2015-05-14T18:10:28Z","updated_at":"2015-05-14T20:55:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4e00860ce939eaa5ffc23ef336f5f77aff09f652","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ripple/rippled/pulls/1047/commits","review_comments_url":"https://api.github.com/repos/ripple/rippled/pulls/1047/comments","review_comment_url":"https://api.github.com/repos/ripple/rippled/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ripple/rippled/issues/1047/comments","statuses_url":"https://api.github.com/repos/ripple/rippled/statuses/cbaf26c70ee4b2fe73209de50b7ac8c32dfb4421","head":{"label":"ximinez:ledger-test","ref":"ledger-test","sha":"cbaf26c70ee4b2fe73209de50b7ac8c32dfb4421","user":{"login":"ximinez","id":6757714,"avatar_url":"https://avatars.githubusercontent.com/u/6757714?v=3","gravatar_id":"","url":"https://api.github.com/users/ximinez","html_url":"https://github.com/ximinez","followers_url":"https://api.github.com/users/ximinez/followers","following_url":"https://api.github.com/users/ximinez/following{/other_user}","gists_url":"https://api.github.com/users/ximinez/gists{/gist_id}","starred_url":"https://api.github.com/users/ximinez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ximinez/subscriptions","organizations_url":"https://api.github.com/users/ximinez/orgs","repos_url":"https://api.github.com/users/ximinez/repos","events_url":"https://api.github.com/users/ximinez/events{/privacy}","received_events_url":"https://api.github.com/users/ximinez/received_events","type":"User","site_admin":false},"repo":{"id":17236735,"name":"rippled","full_name":"ximinez/rippled","owner":{"login":"ximinez","id":6757714,"avatar_url":"https://avatars.githubusercontent.com/u/6757714?v=3","gravatar_id":"","url":"https://api.github.com/users/ximinez","html_url":"https://github.com/ximinez","followers_url":"https://api.github.com/users/ximinez/followers","following_url":"https://api.github.com/users/ximinez/following{/other_user}","gists_url":"https://api.github.com/users/ximinez/gists{/gist_id}","starred_url":"https://api.github.com/users/ximinez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ximinez/subscriptions","organizations_url":"https://api.github.com/users/ximinez/orgs","repos_url":"https://api.github.com/users/ximinez/repos","events_url":"https://api.github.com/users/ximinez/events{/privacy}","received_events_url":"https://api.github.com/users/ximinez/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ximinez/rippled","description":"Ripple peer-to-peer network daemon","fork":true,"url":"https://api.github.com/repos/ximinez/rippled","forks_url":"https://api.github.com/repos/ximinez/rippled/forks","keys_url":"https://api.github.com/repos/ximinez/rippled/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ximinez/rippled/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ximinez/rippled/teams","hooks_url":"https://api.github.com/repos/ximinez/rippled/hooks","issue_events_url":"https://api.github.com/repos/ximinez/rippled/issues/events{/number}","events_url":"https://api.github.com/repos/ximinez/rippled/events","assignees_url":"https://api.github.com/repos/ximinez/rippled/assignees{/user}","branches_url":"https://api.github.com/repos/ximinez/rippled/branches{/branch}","tags_url":"https://api.github.com/repos/ximinez/rippled/tags","blobs_url":"https://api.github.com/repos/ximinez/rippled/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ximinez/rippled/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ximinez/rippled/git/refs{/sha}","trees_url":"https://api.github.com/repos/ximinez/rippled/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ximinez/rippled/statuses/{sha}","languages_url":"https://api.github.com/repos/ximinez/rippled/languages","stargazers_url":"https://api.github.com/repos/ximinez/rippled/stargazers","contributors_url":"https://api.github.com/repos/ximinez/rippled/contributors","subscribers_url":"https://api.github.com/repos/ximinez/rippled/subscribers","subscription_url":"https://api.github.com/repos/ximinez/rippled/subscription","commits_url":"https://api.github.com/repos/ximinez/rippled/commits{/sha}","git_commits_url":"https://api.github.com/repos/ximinez/rippled/git/commits{/sha}","comments_url":"https://api.github.com/repos/ximinez/rippled/comments{/number}","issue_comment_url":"https://api.github.com/repos/ximinez/rippled/issues/comments{/number}","contents_url":"https://api.github.com/repos/ximinez/rippled/contents/{+path}","compare_url":"https://api.github.com/repos/ximinez/rippled/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ximinez/rippled/merges","archive_url":"https://api.github.com/repos/ximinez/rippled/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ximinez/rippled/downloads","issues_url":"https://api.github.com/repos/ximinez/rippled/issues{/number}","pulls_url":"https://api.github.com/repos/ximinez/rippled/pulls{/number}","milestones_url":"https://api.github.com/repos/ximinez/rippled/milestones{/number}","notifications_url":"https://api.github.com/repos/ximinez/rippled/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ximinez/rippled/labels{/name}","releases_url":"https://api.github.com/repos/ximinez/rippled/releases{/id}","created_at":"2014-02-27T04:33:56Z","updated_at":"2015-04-30T15:50:19Z","pushed_at":"2015-05-14T18:33:50Z","git_url":"git://github.com/ximinez/rippled.git","ssh_url":"git@github.com:ximinez/rippled.git","clone_url":"https://github.com/ximinez/rippled.git","svn_url":"https://github.com/ximinez/rippled","homepage":"https://ripple.com","size":53278,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"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":"develop"}},"base":{"label":"ripple:develop","ref":"develop","sha":"c61d0c663e410c3d3622f20092535710243b55af","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}","created_at":"2011-11-07T04:40:15Z","updated_at":"2015-05-14T11:59:15Z","pushed_at":"2015-05-14T20:10:25Z","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":113815,"stargazers_count":946,"watchers_count":946,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":269,"mirror_url":null,"open_issues_count":126,"forks":269,"open_issues":126,"watchers":946,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/ripple/rippled/pulls/1047"},"html":{"href":"https://github.com/ripple/rippled/pull/1047"},"issue":{"href":"https://api.github.com/repos/ripple/rippled/issues/1047"},"comments":{"href":"https://api.github.com/repos/ripple/rippled/issues/1047/comments"},"review_comments":{"href":"https://api.github.com/repos/ripple/rippled/pulls/1047/comments"},"review_comment":{"href":"https://api.github.com/repos/ripple/rippled/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ripple/rippled/pulls/1047/commits"},"statuses":{"href":"https://api.github.com/repos/ripple/rippled/statuses/cbaf26c70ee4b2fe73209de50b7ac8c32dfb4421"}}}}