{"action":"created","comment":{"url":"https://api.github.com/repos/ExchangeUnion/xud/pulls/comments/206545466","pull_request_review_id":141972885,"id":206545466,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNjU0NTQ2Ng==","diff_hunk":"@@ -152,16 +157,20 @@ class MatchingEngine {\n     return matchingResult;\n   }\n \n-  public removeOwnOrder = (orderId: string): orders.StampedOwnOrder | null => {\n-    return this.priorityQueues.buyOrders.removeOne(order => order.id === orderId) ||\n-      this.priorityQueues.sellOrders.removeOne(order => order.id === orderId);\n+  public removeOwnOrder = (orderId: string): StampedOwnOrder | undefined => {\n+    return (this.priorityQueues.buyOrders.removeOne(order => order.id === orderId) ||\n+      this.priorityQueues.sellOrders.removeOne(order => order.id === orderId)) as StampedOwnOrder | undefined;\n   }\n \n-  public removePeerOrders = (predicate: Function): orders.StampedPeerOrder[] => {\n+  public removePeerOrders = (hostId: number): StampedPeerOrder[] => {","path":"lib/orderbook/MatchingEngine.ts","position":160,"original_position":160,"commit_id":"30961993e59ec5afee5a7c6983e86af0c01b4a2a","original_commit_id":"30961993e59ec5afee5a7c6983e86af0c01b4a2a","user":{"login":"moshababo","id":17073733,"node_id":"MDQ6VXNlcjE3MDczNzMz","avatar_url":"https://avatars2.githubusercontent.com/u/17073733?v=4","gravatar_id":"","url":"https://api.github.com/users/moshababo","html_url":"https://github.com/moshababo","followers_url":"https://api.github.com/users/moshababo/followers","following_url":"https://api.github.com/users/moshababo/following{/other_user}","gists_url":"https://api.github.com/users/moshababo/gists{/gist_id}","starred_url":"https://api.github.com/users/moshababo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moshababo/subscriptions","organizations_url":"https://api.github.com/users/moshababo/orgs","repos_url":"https://api.github.com/users/moshababo/repos","events_url":"https://api.github.com/users/moshababo/events{/privacy}","received_events_url":"https://api.github.com/users/moshababo/received_events","type":"User","site_admin":false},"body":"If later we'll need to remove multiple peer orders by a different param, we'll need another function for that. I used a predicate function instead of a regular param to make the interface more open. ","created_at":"2018-07-31T14:15:32Z","updated_at":"2018-07-31T14:17:30Z","html_url":"https://github.com/ExchangeUnion/xud/pull/228#discussion_r206545466","pull_request_url":"https://api.github.com/repos/ExchangeUnion/xud/pulls/228","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/ExchangeUnion/xud/pulls/comments/206545466"},"html":{"href":"https://github.com/ExchangeUnion/xud/pull/228#discussion_r206545466"},"pull_request":{"href":"https://api.github.com/repos/ExchangeUnion/xud/pulls/228"}}},"pull_request":{"url":"https://api.github.com/repos/ExchangeUnion/xud/pulls/228","id":204918730,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA0OTE4NzMw","html_url":"https://github.com/ExchangeUnion/xud/pull/228","diff_url":"https://github.com/ExchangeUnion/xud/pull/228.diff","patch_url":"https://github.com/ExchangeUnion/xud/pull/228.patch","issue_url":"https://api.github.com/repos/ExchangeUnion/xud/issues/228","number":228,"state":"open","locked":false,"title":"Priority queue types & removePeerOrders fix","user":{"login":"sangaman","id":3440835,"node_id":"MDQ6VXNlcjM0NDA4MzU=","avatar_url":"https://avatars1.githubusercontent.com/u/3440835?v=4","gravatar_id":"","url":"https://api.github.com/users/sangaman","html_url":"https://github.com/sangaman","followers_url":"https://api.github.com/users/sangaman/followers","following_url":"https://api.github.com/users/sangaman/following{/other_user}","gists_url":"https://api.github.com/users/sangaman/gists{/gist_id}","starred_url":"https://api.github.com/users/sangaman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sangaman/subscriptions","organizations_url":"https://api.github.com/users/sangaman/orgs","repos_url":"https://api.github.com/users/sangaman/repos","events_url":"https://api.github.com/users/sangaman/events{/privacy}","received_events_url":"https://api.github.com/users/sangaman/received_events","type":"User","site_admin":false},"body":"I created a typed interface for our priority queues in the MatchingEngine.ts class, and in the process detected and fixed a bug with the way peer orders were previously being removed.","created_at":"2018-07-30T20:21:33Z","updated_at":"2018-07-31T14:17:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a34737e09d42c668acaffdefef11f09175eaeec5","assignee":{"login":"sangaman","id":3440835,"node_id":"MDQ6VXNlcjM0NDA4MzU=","avatar_url":"https://avatars1.githubusercontent.com/u/3440835?v=4","gravatar_id":"","url":"https://api.github.com/users/sangaman","html_url":"https://github.com/sangaman","followers_url":"https://api.github.com/users/sangaman/followers","following_url":"https://api.github.com/users/sangaman/following{/other_user}","gists_url":"https://api.github.com/users/sangaman/gists{/gist_id}","starred_url":"https://api.github.com/users/sangaman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sangaman/subscriptions","organizations_url":"https://api.github.com/users/sangaman/orgs","repos_url":"https://api.github.com/users/sangaman/repos","events_url":"https://api.github.com/users/sangaman/events{/privacy}","received_events_url":"https://api.github.com/users/sangaman/received_events","type":"User","site_admin":false},"assignees":[{"login":"sangaman","id":3440835,"node_id":"MDQ6VXNlcjM0NDA4MzU=","avatar_url":"https://avatars1.githubusercontent.com/u/3440835?v=4","gravatar_id":"","url":"https://api.github.com/users/sangaman","html_url":"https://github.com/sangaman","followers_url":"https://api.github.com/users/sangaman/followers","following_url":"https://api.github.com/users/sangaman/following{/other_user}","gists_url":"https://api.github.com/users/sangaman/gists{/gist_id}","starred_url":"https://api.github.com/users/sangaman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sangaman/subscriptions","organizations_url":"https://api.github.com/users/sangaman/orgs","repos_url":"https://api.github.com/users/sangaman/repos","events_url":"https://api.github.com/users/sangaman/events{/privacy}","received_events_url":"https://api.github.com/users/sangaman/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":930952990,"node_id":"MDU6TGFiZWw5MzA5NTI5OTA=","url":"https://api.github.com/repos/ExchangeUnion/xud/labels/in%20progress","name":"in progress","color":"ededed","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/ExchangeUnion/xud/pulls/228/commits","review_comments_url":"https://api.github.com/repos/ExchangeUnion/xud/pulls/228/comments","review_comment_url":"https://api.github.com/repos/ExchangeUnion/xud/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ExchangeUnion/xud/issues/228/comments","statuses_url":"https://api.github.com/repos/ExchangeUnion/xud/statuses/30961993e59ec5afee5a7c6983e86af0c01b4a2a","head":{"label":"ExchangeUnion:priority_queue_types","ref":"priority_queue_types","sha":"30961993e59ec5afee5a7c6983e86af0c01b4a2a","user":{"login":"ExchangeUnion","id":32665502,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyNjY1NTAy","avatar_url":"https://avatars3.githubusercontent.com/u/32665502?v=4","gravatar_id":"","url":"https://api.github.com/users/ExchangeUnion","html_url":"https://github.com/ExchangeUnion","followers_url":"https://api.github.com/users/ExchangeUnion/followers","following_url":"https://api.github.com/users/ExchangeUnion/following{/other_user}","gists_url":"https://api.github.com/users/ExchangeUnion/gists{/gist_id}","starred_url":"https://api.github.com/users/ExchangeUnion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ExchangeUnion/subscriptions","organizations_url":"https://api.github.com/users/ExchangeUnion/orgs","repos_url":"https://api.github.com/users/ExchangeUnion/repos","events_url":"https://api.github.com/users/ExchangeUnion/events{/privacy}","received_events_url":"https://api.github.com/users/ExchangeUnion/received_events","type":"Organization","site_admin":false},"repo":{"id":120945739,"node_id":"MDEwOlJlcG9zaXRvcnkxMjA5NDU3Mzk=","name":"xud","full_name":"ExchangeUnion/xud","owner":{"login":"ExchangeUnion","id":32665502,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyNjY1NTAy","avatar_url":"https://avatars3.githubusercontent.com/u/32665502?v=4","gravatar_id":"","url":"https://api.github.com/users/ExchangeUnion","html_url":"https://github.com/ExchangeUnion","followers_url":"https://api.github.com/users/ExchangeUnion/followers","following_url":"https://api.github.com/users/ExchangeUnion/following{/other_user}","gists_url":"https://api.github.com/users/ExchangeUnion/gists{/gist_id}","starred_url":"https://api.github.com/users/ExchangeUnion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ExchangeUnion/subscriptions","organizations_url":"https://api.github.com/users/ExchangeUnion/orgs","repos_url":"https://api.github.com/users/ExchangeUnion/repos","events_url":"https://api.github.com/users/ExchangeUnion/events{/privacy}","received_events_url":"https://api.github.com/users/ExchangeUnion/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ExchangeUnion/xud","description":"Exchange Union Daemon - Connecting Cryptocurrency Exchanges","fork":false,"url":"https://api.github.com/repos/ExchangeUnion/xud","forks_url":"https://api.github.com/repos/ExchangeUnion/xud/forks","keys_url":"https://api.github.com/repos/ExchangeUnion/xud/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ExchangeUnion/xud/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ExchangeUnion/xud/teams","hooks_url":"https://api.github.com/repos/ExchangeUnion/xud/hooks","issue_events_url":"https://api.github.com/repos/ExchangeUnion/xud/issues/events{/number}","events_url":"https://api.github.com/repos/ExchangeUnion/xud/events","assignees_url":"https://api.github.com/repos/ExchangeUnion/xud/assignees{/user}","branches_url":"https://api.github.com/repos/ExchangeUnion/xud/branches{/branch}","tags_url":"https://api.github.com/repos/ExchangeUnion/xud/tags","blobs_url":"https://api.github.com/repos/ExchangeUnion/xud/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ExchangeUnion/xud/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ExchangeUnion/xud/git/refs{/sha}","trees_url":"https://api.github.com/repos/ExchangeUnion/xud/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ExchangeUnion/xud/statuses/{sha}","languages_url":"https://api.github.com/repos/ExchangeUnion/xud/languages","stargazers_url":"https://api.github.com/repos/ExchangeUnion/xud/stargazers","contributors_url":"https://api.github.com/repos/ExchangeUnion/xud/contributors","subscribers_url":"https://api.github.com/repos/ExchangeUnion/xud/subscribers","subscription_url":"https://api.github.com/repos/ExchangeUnion/xud/subscription","commits_url":"https://api.github.com/repos/ExchangeUnion/xud/commits{/sha}","git_commits_url":"https://api.github.com/repos/ExchangeUnion/xud/git/commits{/sha}","comments_url":"https://api.github.com/repos/ExchangeUnion/xud/comments{/number}","issue_comment_url":"https://api.github.com/repos/ExchangeUnion/xud/issues/comments{/number}","contents_url":"https://api.github.com/repos/ExchangeUnion/xud/contents/{+path}","compare_url":"https://api.github.com/repos/ExchangeUnion/xud/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ExchangeUnion/xud/merges","archive_url":"https://api.github.com/repos/ExchangeUnion/xud/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ExchangeUnion/xud/downloads","issues_url":"https://api.github.com/repos/ExchangeUnion/xud/issues{/number}","pulls_url":"https://api.github.com/repos/ExchangeUnion/xud/pulls{/number}","milestones_url":"https://api.github.com/repos/ExchangeUnion/xud/milestones{/number}","notifications_url":"https://api.github.com/repos/ExchangeUnion/xud/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ExchangeUnion/xud/labels{/name}","releases_url":"https://api.github.com/repos/ExchangeUnion/xud/releases{/id}","deployments_url":"https://api.github.com/repos/ExchangeUnion/xud/deployments","created_at":"2018-02-09T19:18:54Z","updated_at":"2018-07-31T13:16:09Z","pushed_at":"2018-07-31T13:16:09Z","git_url":"git://github.com/ExchangeUnion/xud.git","ssh_url":"git@github.com:ExchangeUnion/xud.git","clone_url":"https://github.com/ExchangeUnion/xud.git","svn_url":"https://github.com/ExchangeUnion/xud","homepage":"https://exchangeunion.com","size":1155,"stargazers_count":26,"watchers_count":26,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"archived":false,"open_issues_count":67,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":12,"open_issues":67,"watchers":26,"default_branch":"master"}},"base":{"label":"ExchangeUnion:master","ref":"master","sha":"b3348a8c6a48015a71fa69353845673e36f747e3","user":{"login":"ExchangeUnion","id":32665502,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyNjY1NTAy","avatar_url":"https://avatars3.githubusercontent.com/u/32665502?v=4","gravatar_id":"","url":"https://api.github.com/users/ExchangeUnion","html_url":"https://github.com/ExchangeUnion","followers_url":"https://api.github.com/users/ExchangeUnion/followers","following_url":"https://api.github.com/users/ExchangeUnion/following{/other_user}","gists_url":"https://api.github.com/users/ExchangeUnion/gists{/gist_id}","starred_url":"https://api.github.com/users/ExchangeUnion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ExchangeUnion/subscriptions","organizations_url":"https://api.github.com/users/ExchangeUnion/orgs","repos_url":"https://api.github.com/users/ExchangeUnion/repos","events_url":"https://api.github.com/users/ExchangeUnion/events{/privacy}","received_events_url":"https://api.github.com/users/ExchangeUnion/received_events","type":"Organization","site_admin":false},"repo":{"id":120945739,"node_id":"MDEwOlJlcG9zaXRvcnkxMjA5NDU3Mzk=","name":"xud","full_name":"ExchangeUnion/xud","owner":{"login":"ExchangeUnion","id":32665502,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyNjY1NTAy","avatar_url":"https://avatars3.githubusercontent.com/u/32665502?v=4","gravatar_id":"","url":"https://api.github.com/users/ExchangeUnion","html_url":"https://github.com/ExchangeUnion","followers_url":"https://api.github.com/users/ExchangeUnion/followers","following_url":"https://api.github.com/users/ExchangeUnion/following{/other_user}","gists_url":"https://api.github.com/users/ExchangeUnion/gists{/gist_id}","starred_url":"https://api.github.com/users/ExchangeUnion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ExchangeUnion/subscriptions","organizations_url":"https://api.github.com/users/ExchangeUnion/orgs","repos_url":"https://api.github.com/users/ExchangeUnion/repos","events_url":"https://api.github.com/users/ExchangeUnion/events{/privacy}","received_events_url":"https://api.github.com/users/ExchangeUnion/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ExchangeUnion/xud","description":"Exchange Union Daemon - Connecting Cryptocurrency Exchanges","fork":false,"url":"https://api.github.com/repos/ExchangeUnion/xud","forks_url":"https://api.github.com/repos/ExchangeUnion/xud/forks","keys_url":"https://api.github.com/repos/ExchangeUnion/xud/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ExchangeUnion/xud/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ExchangeUnion/xud/teams","hooks_url":"https://api.github.com/repos/ExchangeUnion/xud/hooks","issue_events_url":"https://api.github.com/repos/ExchangeUnion/xud/issues/events{/number}","events_url":"https://api.github.com/repos/ExchangeUnion/xud/events","assignees_url":"https://api.github.com/repos/ExchangeUnion/xud/assignees{/user}","branches_url":"https://api.github.com/repos/ExchangeUnion/xud/branches{/branch}","tags_url":"https://api.github.com/repos/ExchangeUnion/xud/tags","blobs_url":"https://api.github.com/repos/ExchangeUnion/xud/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ExchangeUnion/xud/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ExchangeUnion/xud/git/refs{/sha}","trees_url":"https://api.github.com/repos/ExchangeUnion/xud/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ExchangeUnion/xud/statuses/{sha}","languages_url":"https://api.github.com/repos/ExchangeUnion/xud/languages","stargazers_url":"https://api.github.com/repos/ExchangeUnion/xud/stargazers","contributors_url":"https://api.github.com/repos/ExchangeUnion/xud/contributors","subscribers_url":"https://api.github.com/repos/ExchangeUnion/xud/subscribers","subscription_url":"https://api.github.com/repos/ExchangeUnion/xud/subscription","commits_url":"https://api.github.com/repos/ExchangeUnion/xud/commits{/sha}","git_commits_url":"https://api.github.com/repos/ExchangeUnion/xud/git/commits{/sha}","comments_url":"https://api.github.com/repos/ExchangeUnion/xud/comments{/number}","issue_comment_url":"https://api.github.com/repos/ExchangeUnion/xud/issues/comments{/number}","contents_url":"https://api.github.com/repos/ExchangeUnion/xud/contents/{+path}","compare_url":"https://api.github.com/repos/ExchangeUnion/xud/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ExchangeUnion/xud/merges","archive_url":"https://api.github.com/repos/ExchangeUnion/xud/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ExchangeUnion/xud/downloads","issues_url":"https://api.github.com/repos/ExchangeUnion/xud/issues{/number}","pulls_url":"https://api.github.com/repos/ExchangeUnion/xud/pulls{/number}","milestones_url":"https://api.github.com/repos/ExchangeUnion/xud/milestones{/number}","notifications_url":"https://api.github.com/repos/ExchangeUnion/xud/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ExchangeUnion/xud/labels{/name}","releases_url":"https://api.github.com/repos/ExchangeUnion/xud/releases{/id}","deployments_url":"https://api.github.com/repos/ExchangeUnion/xud/deployments","created_at":"2018-02-09T19:18:54Z","updated_at":"2018-07-31T13:16:09Z","pushed_at":"2018-07-31T13:16:09Z","git_url":"git://github.com/ExchangeUnion/xud.git","ssh_url":"git@github.com:ExchangeUnion/xud.git","clone_url":"https://github.com/ExchangeUnion/xud.git","svn_url":"https://github.com/ExchangeUnion/xud","homepage":"https://exchangeunion.com","size":1155,"stargazers_count":26,"watchers_count":26,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"archived":false,"open_issues_count":67,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":12,"open_issues":67,"watchers":26,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ExchangeUnion/xud/pulls/228"},"html":{"href":"https://github.com/ExchangeUnion/xud/pull/228"},"issue":{"href":"https://api.github.com/repos/ExchangeUnion/xud/issues/228"},"comments":{"href":"https://api.github.com/repos/ExchangeUnion/xud/issues/228/comments"},"review_comments":{"href":"https://api.github.com/repos/ExchangeUnion/xud/pulls/228/comments"},"review_comment":{"href":"https://api.github.com/repos/ExchangeUnion/xud/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ExchangeUnion/xud/pulls/228/commits"},"statuses":{"href":"https://api.github.com/repos/ExchangeUnion/xud/statuses/30961993e59ec5afee5a7c6983e86af0c01b4a2a"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"moshababo"}}