{"action":"created","comment":{"url":"https://api.github.com/repos/interledgerjs/ilp-connector/pulls/comments/186746273","pull_request_review_id":118385368,"id":186746273,"diff_hunk":"@@ -406,11 +407,13 @@ export default class RouteBroadcaster {\n       routingTableId: this.forwardingRoutingTable.routingTableId,\n       currentEpoch: this.forwardingRoutingTable.currentEpoch,\n       localRoutingTable: formatRoutingTableAsJson(this.localRoutingTable),\n-      forwardingRoutingTable: formatRoutingTableAsJson(this.forwardingRoutingTable),\n-      routingLog: this.forwardingRoutingTable.log.map(entry => ({\n-        ...entry,\n-        route: entry.route && formatRouteAsJson(entry.route)\n-      })),\n+      forwardingRoutingTable: formatForwardingRoutingTableAsJson(this.forwardingRoutingTable),\n+      routingLog: this.forwardingRoutingTable.log\n+        .filter(Boolean)\n+        .map(entry => ({\n+          ...entry,\n+          route: entry && entry.route && formatRouteAsJson(entry.route)","path":"src/services/route-broadcaster.ts","position":24,"original_position":24,"commit_id":"f35a78513c002c92db4344a3bbe5f1e76ca4f571","original_commit_id":"f35a78513c002c92db4344a3bbe5f1e76ca4f571","user":{"login":"justmoon","id":53233,"avatar_url":"https://avatars1.githubusercontent.com/u/53233?v=4","gravatar_id":"","url":"https://api.github.com/users/justmoon","html_url":"https://github.com/justmoon","followers_url":"https://api.github.com/users/justmoon/followers","following_url":"https://api.github.com/users/justmoon/following{/other_user}","gists_url":"https://api.github.com/users/justmoon/gists{/gist_id}","starred_url":"https://api.github.com/users/justmoon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justmoon/subscriptions","organizations_url":"https://api.github.com/users/justmoon/orgs","repos_url":"https://api.github.com/users/justmoon/repos","events_url":"https://api.github.com/users/justmoon/events{/privacy}","received_events_url":"https://api.github.com/users/justmoon/received_events","type":"User","site_admin":false},"body":"No, unfortunately, TypeScript isn't smart enough, so the `entry &&` is needed to make the type checker happy. :/","created_at":"2018-05-08T14:25:34Z","updated_at":"2018-05-08T14:25:34Z","html_url":"https://github.com/interledgerjs/ilp-connector/pull/431#discussion_r186746273","pull_request_url":"https://api.github.com/repos/interledgerjs/ilp-connector/pulls/431","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/interledgerjs/ilp-connector/pulls/comments/186746273"},"html":{"href":"https://github.com/interledgerjs/ilp-connector/pull/431#discussion_r186746273"},"pull_request":{"href":"https://api.github.com/repos/interledgerjs/ilp-connector/pulls/431"}},"in_reply_to_id":186443069},"pull_request":{"url":"https://api.github.com/repos/interledgerjs/ilp-connector/pulls/431","id":186223294,"html_url":"https://github.com/interledgerjs/ilp-connector/pull/431","diff_url":"https://github.com/interledgerjs/ilp-connector/pull/431.diff","patch_url":"https://github.com/interledgerjs/ilp-connector/pull/431.patch","issue_url":"https://api.github.com/repos/interledgerjs/ilp-connector/issues/431","number":431,"state":"open","locked":false,"title":"Performance: Cleanup redundant routes","user":{"login":"justmoon","id":53233,"avatar_url":"https://avatars1.githubusercontent.com/u/53233?v=4","gravatar_id":"","url":"https://api.github.com/users/justmoon","html_url":"https://github.com/justmoon","followers_url":"https://api.github.com/users/justmoon/followers","following_url":"https://api.github.com/users/justmoon/following{/other_user}","gists_url":"https://api.github.com/users/justmoon/gists{/gist_id}","starred_url":"https://api.github.com/users/justmoon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justmoon/subscriptions","organizations_url":"https://api.github.com/users/justmoon/orgs","repos_url":"https://api.github.com/users/justmoon/repos","events_url":"https://api.github.com/users/justmoon/events{/privacy}","received_events_url":"https://api.github.com/users/justmoon/received_events","type":"User","site_admin":false},"body":"Previously, connectors would broadcast a full history of their routing table changes:\r\n\r\n```\r\n1: g.u1 => g.u1\r\n2: g.u2 => g.u1 g.u2\r\n3: g.u2 withdrawn\r\n```\r\n\r\nHowever, if an update is overwritten by a later update, we can safely delete it. E.g. this log is equivalent:\r\n\r\n```\r\n1: g.u1 => g.u1\r\n3: g.u2 withdrawn\r\n```\r\n\r\nNote that we can't delete update no.3 even though it is now a no-op for anyone downloading the table from scratch. This is because someone might have downloaded our routing table up to epoch 2 and they still need to know that we no longer serve this route.\r\n\r\nBoth route changes and route withdrawals can be removed from the log when a new entry for the same entry is added, regardless of whether the new entry is adding, changing, or removing the route. When adding a route update to the log, there will be at most one previous update for that prefix in the log. We may safely delete it.","created_at":"2018-05-06T19:55:24Z","updated_at":"2018-05-08T14:25:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fc35312decc6f8997d11958672b4d3c97a7cf872","assignee":{"login":"justmoon","id":53233,"avatar_url":"https://avatars1.githubusercontent.com/u/53233?v=4","gravatar_id":"","url":"https://api.github.com/users/justmoon","html_url":"https://github.com/justmoon","followers_url":"https://api.github.com/users/justmoon/followers","following_url":"https://api.github.com/users/justmoon/following{/other_user}","gists_url":"https://api.github.com/users/justmoon/gists{/gist_id}","starred_url":"https://api.github.com/users/justmoon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justmoon/subscriptions","organizations_url":"https://api.github.com/users/justmoon/orgs","repos_url":"https://api.github.com/users/justmoon/repos","events_url":"https://api.github.com/users/justmoon/events{/privacy}","received_events_url":"https://api.github.com/users/justmoon/received_events","type":"User","site_admin":false},"assignees":[{"login":"justmoon","id":53233,"avatar_url":"https://avatars1.githubusercontent.com/u/53233?v=4","gravatar_id":"","url":"https://api.github.com/users/justmoon","html_url":"https://github.com/justmoon","followers_url":"https://api.github.com/users/justmoon/followers","following_url":"https://api.github.com/users/justmoon/following{/other_user}","gists_url":"https://api.github.com/users/justmoon/gists{/gist_id}","starred_url":"https://api.github.com/users/justmoon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justmoon/subscriptions","organizations_url":"https://api.github.com/users/justmoon/orgs","repos_url":"https://api.github.com/users/justmoon/repos","events_url":"https://api.github.com/users/justmoon/events{/privacy}","received_events_url":"https://api.github.com/users/justmoon/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/interledgerjs/ilp-connector/pulls/431/commits","review_comments_url":"https://api.github.com/repos/interledgerjs/ilp-connector/pulls/431/comments","review_comment_url":"https://api.github.com/repos/interledgerjs/ilp-connector/pulls/comments{/number}","comments_url":"https://api.github.com/repos/interledgerjs/ilp-connector/issues/431/comments","statuses_url":"https://api.github.com/repos/interledgerjs/ilp-connector/statuses/f35a78513c002c92db4344a3bbe5f1e76ca4f571","head":{"label":"interledgerjs:perf/st-cleanup-redundant-routes","ref":"perf/st-cleanup-redundant-routes","sha":"f35a78513c002c92db4344a3bbe5f1e76ca4f571","user":{"login":"interledgerjs","id":22465593,"avatar_url":"https://avatars1.githubusercontent.com/u/22465593?v=4","gravatar_id":"","url":"https://api.github.com/users/interledgerjs","html_url":"https://github.com/interledgerjs","followers_url":"https://api.github.com/users/interledgerjs/followers","following_url":"https://api.github.com/users/interledgerjs/following{/other_user}","gists_url":"https://api.github.com/users/interledgerjs/gists{/gist_id}","starred_url":"https://api.github.com/users/interledgerjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/interledgerjs/subscriptions","organizations_url":"https://api.github.com/users/interledgerjs/orgs","repos_url":"https://api.github.com/users/interledgerjs/repos","events_url":"https://api.github.com/users/interledgerjs/events{/privacy}","received_events_url":"https://api.github.com/users/interledgerjs/received_events","type":"Organization","site_admin":false},"repo":{"id":30608872,"name":"ilp-connector","full_name":"interledgerjs/ilp-connector","owner":{"login":"interledgerjs","id":22465593,"avatar_url":"https://avatars1.githubusercontent.com/u/22465593?v=4","gravatar_id":"","url":"https://api.github.com/users/interledgerjs","html_url":"https://github.com/interledgerjs","followers_url":"https://api.github.com/users/interledgerjs/followers","following_url":"https://api.github.com/users/interledgerjs/following{/other_user}","gists_url":"https://api.github.com/users/interledgerjs/gists{/gist_id}","starred_url":"https://api.github.com/users/interledgerjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/interledgerjs/subscriptions","organizations_url":"https://api.github.com/users/interledgerjs/orgs","repos_url":"https://api.github.com/users/interledgerjs/repos","events_url":"https://api.github.com/users/interledgerjs/events{/privacy}","received_events_url":"https://api.github.com/users/interledgerjs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/interledgerjs/ilp-connector","description":"Reference implementation of an Interledger connector.","fork":false,"url":"https://api.github.com/repos/interledgerjs/ilp-connector","forks_url":"https://api.github.com/repos/interledgerjs/ilp-connector/forks","keys_url":"https://api.github.com/repos/interledgerjs/ilp-connector/keys{/key_id}","collaborators_url":"https://api.github.com/repos/interledgerjs/ilp-connector/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/interledgerjs/ilp-connector/teams","hooks_url":"https://api.github.com/repos/interledgerjs/ilp-connector/hooks","issue_events_url":"https://api.github.com/repos/interledgerjs/ilp-connector/issues/events{/number}","events_url":"https://api.github.com/repos/interledgerjs/ilp-connector/events","assignees_url":"https://api.github.com/repos/interledgerjs/ilp-connector/assignees{/user}","branches_url":"https://api.github.com/repos/interledgerjs/ilp-connector/branches{/branch}","tags_url":"https://api.github.com/repos/interledgerjs/ilp-connector/tags","blobs_url":"https://api.github.com/repos/interledgerjs/ilp-connector/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/interledgerjs/ilp-connector/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/interledgerjs/ilp-connector/git/refs{/sha}","trees_url":"https://api.github.com/repos/interledgerjs/ilp-connector/git/trees{/sha}","statuses_url":"https://api.github.com/repos/interledgerjs/ilp-connector/statuses/{sha}","languages_url":"https://api.github.com/repos/interledgerjs/ilp-connector/languages","stargazers_url":"https://api.github.com/repos/interledgerjs/ilp-connector/stargazers","contributors_url":"https://api.github.com/repos/interledgerjs/ilp-connector/contributors","subscribers_url":"https://api.github.com/repos/interledgerjs/ilp-connector/subscribers","subscription_url":"https://api.github.com/repos/interledgerjs/ilp-connector/subscription","commits_url":"https://api.github.com/repos/interledgerjs/ilp-connector/commits{/sha}","git_commits_url":"https://api.github.com/repos/interledgerjs/ilp-connector/git/commits{/sha}","comments_url":"https://api.github.com/repos/interledgerjs/ilp-connector/comments{/number}","issue_comment_url":"https://api.github.com/repos/interledgerjs/ilp-connector/issues/comments{/number}","contents_url":"https://api.github.com/repos/interledgerjs/ilp-connector/contents/{+path}","compare_url":"https://api.github.com/repos/interledgerjs/ilp-connector/compare/{base}...{head}","merges_url":"https://api.github.com/repos/interledgerjs/ilp-connector/merges","archive_url":"https://api.github.com/repos/interledgerjs/ilp-connector/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/interledgerjs/ilp-connector/downloads","issues_url":"https://api.github.com/repos/interledgerjs/ilp-connector/issues{/number}","pulls_url":"https://api.github.com/repos/interledgerjs/ilp-connector/pulls{/number}","milestones_url":"https://api.github.com/repos/interledgerjs/ilp-connector/milestones{/number}","notifications_url":"https://api.github.com/repos/interledgerjs/ilp-connector/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/interledgerjs/ilp-connector/labels{/name}","releases_url":"https://api.github.com/repos/interledgerjs/ilp-connector/releases{/id}","deployments_url":"https://api.github.com/repos/interledgerjs/ilp-connector/deployments","created_at":"2015-02-10T19:01:26Z","updated_at":"2018-05-03T19:26:01Z","pushed_at":"2018-05-06T19:55:24Z","git_url":"git://github.com/interledgerjs/ilp-connector.git","ssh_url":"git@github.com:interledgerjs/ilp-connector.git","clone_url":"https://github.com/interledgerjs/ilp-connector.git","svn_url":"https://github.com/interledgerjs/ilp-connector","homepage":"","size":2921,"stargazers_count":43,"watchers_count":43,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":17,"mirror_url":null,"archived":false,"open_issues_count":46,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":17,"open_issues":46,"watchers":43,"default_branch":"master"}},"base":{"label":"interledgerjs:master","ref":"master","sha":"9029c56495a94bfb7c8f5727afab61f285019ae3","user":{"login":"interledgerjs","id":22465593,"avatar_url":"https://avatars1.githubusercontent.com/u/22465593?v=4","gravatar_id":"","url":"https://api.github.com/users/interledgerjs","html_url":"https://github.com/interledgerjs","followers_url":"https://api.github.com/users/interledgerjs/followers","following_url":"https://api.github.com/users/interledgerjs/following{/other_user}","gists_url":"https://api.github.com/users/interledgerjs/gists{/gist_id}","starred_url":"https://api.github.com/users/interledgerjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/interledgerjs/subscriptions","organizations_url":"https://api.github.com/users/interledgerjs/orgs","repos_url":"https://api.github.com/users/interledgerjs/repos","events_url":"https://api.github.com/users/interledgerjs/events{/privacy}","received_events_url":"https://api.github.com/users/interledgerjs/received_events","type":"Organization","site_admin":false},"repo":{"id":30608872,"name":"ilp-connector","full_name":"interledgerjs/ilp-connector","owner":{"login":"interledgerjs","id":22465593,"avatar_url":"https://avatars1.githubusercontent.com/u/22465593?v=4","gravatar_id":"","url":"https://api.github.com/users/interledgerjs","html_url":"https://github.com/interledgerjs","followers_url":"https://api.github.com/users/interledgerjs/followers","following_url":"https://api.github.com/users/interledgerjs/following{/other_user}","gists_url":"https://api.github.com/users/interledgerjs/gists{/gist_id}","starred_url":"https://api.github.com/users/interledgerjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/interledgerjs/subscriptions","organizations_url":"https://api.github.com/users/interledgerjs/orgs","repos_url":"https://api.github.com/users/interledgerjs/repos","events_url":"https://api.github.com/users/interledgerjs/events{/privacy}","received_events_url":"https://api.github.com/users/interledgerjs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/interledgerjs/ilp-connector","description":"Reference implementation of an Interledger connector.","fork":false,"url":"https://api.github.com/repos/interledgerjs/ilp-connector","forks_url":"https://api.github.com/repos/interledgerjs/ilp-connector/forks","keys_url":"https://api.github.com/repos/interledgerjs/ilp-connector/keys{/key_id}","collaborators_url":"https://api.github.com/repos/interledgerjs/ilp-connector/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/interledgerjs/ilp-connector/teams","hooks_url":"https://api.github.com/repos/interledgerjs/ilp-connector/hooks","issue_events_url":"https://api.github.com/repos/interledgerjs/ilp-connector/issues/events{/number}","events_url":"https://api.github.com/repos/interledgerjs/ilp-connector/events","assignees_url":"https://api.github.com/repos/interledgerjs/ilp-connector/assignees{/user}","branches_url":"https://api.github.com/repos/interledgerjs/ilp-connector/branches{/branch}","tags_url":"https://api.github.com/repos/interledgerjs/ilp-connector/tags","blobs_url":"https://api.github.com/repos/interledgerjs/ilp-connector/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/interledgerjs/ilp-connector/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/interledgerjs/ilp-connector/git/refs{/sha}","trees_url":"https://api.github.com/repos/interledgerjs/ilp-connector/git/trees{/sha}","statuses_url":"https://api.github.com/repos/interledgerjs/ilp-connector/statuses/{sha}","languages_url":"https://api.github.com/repos/interledgerjs/ilp-connector/languages","stargazers_url":"https://api.github.com/repos/interledgerjs/ilp-connector/stargazers","contributors_url":"https://api.github.com/repos/interledgerjs/ilp-connector/contributors","subscribers_url":"https://api.github.com/repos/interledgerjs/ilp-connector/subscribers","subscription_url":"https://api.github.com/repos/interledgerjs/ilp-connector/subscription","commits_url":"https://api.github.com/repos/interledgerjs/ilp-connector/commits{/sha}","git_commits_url":"https://api.github.com/repos/interledgerjs/ilp-connector/git/commits{/sha}","comments_url":"https://api.github.com/repos/interledgerjs/ilp-connector/comments{/number}","issue_comment_url":"https://api.github.com/repos/interledgerjs/ilp-connector/issues/comments{/number}","contents_url":"https://api.github.com/repos/interledgerjs/ilp-connector/contents/{+path}","compare_url":"https://api.github.com/repos/interledgerjs/ilp-connector/compare/{base}...{head}","merges_url":"https://api.github.com/repos/interledgerjs/ilp-connector/merges","archive_url":"https://api.github.com/repos/interledgerjs/ilp-connector/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/interledgerjs/ilp-connector/downloads","issues_url":"https://api.github.com/repos/interledgerjs/ilp-connector/issues{/number}","pulls_url":"https://api.github.com/repos/interledgerjs/ilp-connector/pulls{/number}","milestones_url":"https://api.github.com/repos/interledgerjs/ilp-connector/milestones{/number}","notifications_url":"https://api.github.com/repos/interledgerjs/ilp-connector/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/interledgerjs/ilp-connector/labels{/name}","releases_url":"https://api.github.com/repos/interledgerjs/ilp-connector/releases{/id}","deployments_url":"https://api.github.com/repos/interledgerjs/ilp-connector/deployments","created_at":"2015-02-10T19:01:26Z","updated_at":"2018-05-03T19:26:01Z","pushed_at":"2018-05-06T19:55:24Z","git_url":"git://github.com/interledgerjs/ilp-connector.git","ssh_url":"git@github.com:interledgerjs/ilp-connector.git","clone_url":"https://github.com/interledgerjs/ilp-connector.git","svn_url":"https://github.com/interledgerjs/ilp-connector","homepage":"","size":2921,"stargazers_count":43,"watchers_count":43,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":17,"mirror_url":null,"archived":false,"open_issues_count":46,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":17,"open_issues":46,"watchers":43,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/interledgerjs/ilp-connector/pulls/431"},"html":{"href":"https://github.com/interledgerjs/ilp-connector/pull/431"},"issue":{"href":"https://api.github.com/repos/interledgerjs/ilp-connector/issues/431"},"comments":{"href":"https://api.github.com/repos/interledgerjs/ilp-connector/issues/431/comments"},"review_comments":{"href":"https://api.github.com/repos/interledgerjs/ilp-connector/pulls/431/comments"},"review_comment":{"href":"https://api.github.com/repos/interledgerjs/ilp-connector/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/interledgerjs/ilp-connector/pulls/431/commits"},"statuses":{"href":"https://api.github.com/repos/interledgerjs/ilp-connector/statuses/f35a78513c002c92db4344a3bbe5f1e76ca4f571"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"justmoon"}}