{"action":"created","comment":{"url":"https://api.github.com/repos/neo-project/neo/pulls/comments/235761264","pull_request_review_id":177702224,"id":235761264,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNTc2MTI2NA==","diff_hunk":"@@ -57,16 +61,18 @@ protected void AddPeers(IEnumerable<IPEndPoint> peers)\n             }\n         }\n \n-        protected void ConnectToPeer(IPEndPoint endPoint)\n+        protected void ConnectToPeer(IPEndPoint endPoint, bool isTrusted = false)\n         {\n             endPoint = endPoint.Unmap();\n             if (endPoint.Port == ListenerPort && localAddresses.Contains(endPoint.Address)) return;\n+\n+            if (isTrusted) TrustedIpAddresses.Add(endPoint.Address);","path":"neo/Network/P2P/Peer.cs","position":46,"original_position":46,"commit_id":"8c8d937deafa40f5e3314e410d0c0b60b30d84fc","original_commit_id":"8c8d937deafa40f5e3314e410d0c0b60b30d84fc","user":{"login":"shargon","id":3167973,"node_id":"MDQ6VXNlcjMxNjc5NzM=","avatar_url":"https://avatars0.githubusercontent.com/u/3167973?v=4","gravatar_id":"","url":"https://api.github.com/users/shargon","html_url":"https://github.com/shargon","followers_url":"https://api.github.com/users/shargon/followers","following_url":"https://api.github.com/users/shargon/following{/other_user}","gists_url":"https://api.github.com/users/shargon/gists{/gist_id}","starred_url":"https://api.github.com/users/shargon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shargon/subscriptions","organizations_url":"https://api.github.com/users/shargon/orgs","repos_url":"https://api.github.com/users/shargon/repos","events_url":"https://api.github.com/users/shargon/events{/privacy}","received_events_url":"https://api.github.com/users/shargon/received_events","type":"User","site_admin":false},"body":"So at the moment no Address is Trusted? neither from `protocol.json`?","created_at":"2018-11-22T15:23:22Z","updated_at":"2018-11-22T15:23:22Z","html_url":"https://github.com/neo-project/neo/pull/470#discussion_r235761264","pull_request_url":"https://api.github.com/repos/neo-project/neo/pulls/470","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/neo-project/neo/pulls/comments/235761264"},"html":{"href":"https://github.com/neo-project/neo/pull/470#discussion_r235761264"},"pull_request":{"href":"https://api.github.com/repos/neo-project/neo/pulls/470"}},"in_reply_to_id":235626830},"pull_request":{"url":"https://api.github.com/repos/neo-project/neo/pulls/470","id":231312382,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMxMzEyMzgy","html_url":"https://github.com/neo-project/neo/pull/470","diff_url":"https://github.com/neo-project/neo/pull/470.diff","patch_url":"https://github.com/neo-project/neo/pull/470.patch","issue_url":"https://api.github.com/repos/neo-project/neo/issues/470","number":470,"state":"open","locked":false,"title":"Limit incoming connections based on param. Support connecting to trusted IPs.","user":{"login":"jsolman","id":4105414,"node_id":"MDQ6VXNlcjQxMDU0MTQ=","avatar_url":"https://avatars1.githubusercontent.com/u/4105414?v=4","gravatar_id":"","url":"https://api.github.com/users/jsolman","html_url":"https://github.com/jsolman","followers_url":"https://api.github.com/users/jsolman/followers","following_url":"https://api.github.com/users/jsolman/following{/other_user}","gists_url":"https://api.github.com/users/jsolman/gists{/gist_id}","starred_url":"https://api.github.com/users/jsolman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsolman/subscriptions","organizations_url":"https://api.github.com/users/jsolman/orgs","repos_url":"https://api.github.com/users/jsolman/repos","events_url":"https://api.github.com/users/jsolman/events{/privacy}","received_events_url":"https://api.github.com/users/jsolman/received_events","type":"User","site_admin":false},"body":"Closes #431 \r\nSee issue #431 for details.\r\n\r\nFrom my testing so far the changes work as desired. The max number of nodes connected never goes above the `MaxConnections`.","created_at":"2018-11-15T19:44:37Z","updated_at":"2018-11-22T15:23:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cc157acdbf403dbc0be41abe6d9433ec98ed5d87","assignee":null,"assignees":[],"requested_reviewers":[{"login":"belane","id":17031267,"node_id":"MDQ6VXNlcjE3MDMxMjY3","avatar_url":"https://avatars3.githubusercontent.com/u/17031267?v=4","gravatar_id":"","url":"https://api.github.com/users/belane","html_url":"https://github.com/belane","followers_url":"https://api.github.com/users/belane/followers","following_url":"https://api.github.com/users/belane/following{/other_user}","gists_url":"https://api.github.com/users/belane/gists{/gist_id}","starred_url":"https://api.github.com/users/belane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/belane/subscriptions","organizations_url":"https://api.github.com/users/belane/orgs","repos_url":"https://api.github.com/users/belane/repos","events_url":"https://api.github.com/users/belane/events{/privacy}","received_events_url":"https://api.github.com/users/belane/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/neo-project/neo/pulls/470/commits","review_comments_url":"https://api.github.com/repos/neo-project/neo/pulls/470/comments","review_comment_url":"https://api.github.com/repos/neo-project/neo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/neo-project/neo/issues/470/comments","statuses_url":"https://api.github.com/repos/neo-project/neo/statuses/8c8d937deafa40f5e3314e410d0c0b60b30d84fc","head":{"label":"neo-project:PreventTooManyConnections","ref":"PreventTooManyConnections","sha":"8c8d937deafa40f5e3314e410d0c0b60b30d84fc","user":{"login":"neo-project","id":12685221,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNjg1MjIx","avatar_url":"https://avatars3.githubusercontent.com/u/12685221?v=4","gravatar_id":"","url":"https://api.github.com/users/neo-project","html_url":"https://github.com/neo-project","followers_url":"https://api.github.com/users/neo-project/followers","following_url":"https://api.github.com/users/neo-project/following{/other_user}","gists_url":"https://api.github.com/users/neo-project/gists{/gist_id}","starred_url":"https://api.github.com/users/neo-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neo-project/subscriptions","organizations_url":"https://api.github.com/users/neo-project/orgs","repos_url":"https://api.github.com/users/neo-project/repos","events_url":"https://api.github.com/users/neo-project/events{/privacy}","received_events_url":"https://api.github.com/users/neo-project/received_events","type":"Organization","site_admin":false},"repo":{"id":36613036,"node_id":"MDEwOlJlcG9zaXRvcnkzNjYxMzAzNg==","name":"neo","full_name":"neo-project/neo","private":false,"owner":{"login":"neo-project","id":12685221,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNjg1MjIx","avatar_url":"https://avatars3.githubusercontent.com/u/12685221?v=4","gravatar_id":"","url":"https://api.github.com/users/neo-project","html_url":"https://github.com/neo-project","followers_url":"https://api.github.com/users/neo-project/followers","following_url":"https://api.github.com/users/neo-project/following{/other_user}","gists_url":"https://api.github.com/users/neo-project/gists{/gist_id}","starred_url":"https://api.github.com/users/neo-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neo-project/subscriptions","organizations_url":"https://api.github.com/users/neo-project/orgs","repos_url":"https://api.github.com/users/neo-project/repos","events_url":"https://api.github.com/users/neo-project/events{/privacy}","received_events_url":"https://api.github.com/users/neo-project/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/neo-project/neo","description":"NEO Smart Economy","fork":false,"url":"https://api.github.com/repos/neo-project/neo","forks_url":"https://api.github.com/repos/neo-project/neo/forks","keys_url":"https://api.github.com/repos/neo-project/neo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/neo-project/neo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/neo-project/neo/teams","hooks_url":"https://api.github.com/repos/neo-project/neo/hooks","issue_events_url":"https://api.github.com/repos/neo-project/neo/issues/events{/number}","events_url":"https://api.github.com/repos/neo-project/neo/events","assignees_url":"https://api.github.com/repos/neo-project/neo/assignees{/user}","branches_url":"https://api.github.com/repos/neo-project/neo/branches{/branch}","tags_url":"https://api.github.com/repos/neo-project/neo/tags","blobs_url":"https://api.github.com/repos/neo-project/neo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/neo-project/neo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/neo-project/neo/git/refs{/sha}","trees_url":"https://api.github.com/repos/neo-project/neo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/neo-project/neo/statuses/{sha}","languages_url":"https://api.github.com/repos/neo-project/neo/languages","stargazers_url":"https://api.github.com/repos/neo-project/neo/stargazers","contributors_url":"https://api.github.com/repos/neo-project/neo/contributors","subscribers_url":"https://api.github.com/repos/neo-project/neo/subscribers","subscription_url":"https://api.github.com/repos/neo-project/neo/subscription","commits_url":"https://api.github.com/repos/neo-project/neo/commits{/sha}","git_commits_url":"https://api.github.com/repos/neo-project/neo/git/commits{/sha}","comments_url":"https://api.github.com/repos/neo-project/neo/comments{/number}","issue_comment_url":"https://api.github.com/repos/neo-project/neo/issues/comments{/number}","contents_url":"https://api.github.com/repos/neo-project/neo/contents/{+path}","compare_url":"https://api.github.com/repos/neo-project/neo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/neo-project/neo/merges","archive_url":"https://api.github.com/repos/neo-project/neo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/neo-project/neo/downloads","issues_url":"https://api.github.com/repos/neo-project/neo/issues{/number}","pulls_url":"https://api.github.com/repos/neo-project/neo/pulls{/number}","milestones_url":"https://api.github.com/repos/neo-project/neo/milestones{/number}","notifications_url":"https://api.github.com/repos/neo-project/neo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/neo-project/neo/labels{/name}","releases_url":"https://api.github.com/repos/neo-project/neo/releases{/id}","deployments_url":"https://api.github.com/repos/neo-project/neo/deployments","created_at":"2015-05-31T17:02:33Z","updated_at":"2018-11-22T05:20:48Z","pushed_at":"2018-11-22T14:47:36Z","git_url":"git://github.com/neo-project/neo.git","ssh_url":"git@github.com:neo-project/neo.git","clone_url":"https://github.com/neo-project/neo.git","svn_url":"https://github.com/neo-project/neo","homepage":"","size":3301,"stargazers_count":2695,"watchers_count":2695,"language":"C#","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":856,"mirror_url":null,"archived":false,"open_issues_count":90,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":856,"open_issues":90,"watchers":2695,"default_branch":"master"}},"base":{"label":"neo-project:master","ref":"master","sha":"40f76d24b5d529d267bcad535a100b4376027703","user":{"login":"neo-project","id":12685221,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNjg1MjIx","avatar_url":"https://avatars3.githubusercontent.com/u/12685221?v=4","gravatar_id":"","url":"https://api.github.com/users/neo-project","html_url":"https://github.com/neo-project","followers_url":"https://api.github.com/users/neo-project/followers","following_url":"https://api.github.com/users/neo-project/following{/other_user}","gists_url":"https://api.github.com/users/neo-project/gists{/gist_id}","starred_url":"https://api.github.com/users/neo-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neo-project/subscriptions","organizations_url":"https://api.github.com/users/neo-project/orgs","repos_url":"https://api.github.com/users/neo-project/repos","events_url":"https://api.github.com/users/neo-project/events{/privacy}","received_events_url":"https://api.github.com/users/neo-project/received_events","type":"Organization","site_admin":false},"repo":{"id":36613036,"node_id":"MDEwOlJlcG9zaXRvcnkzNjYxMzAzNg==","name":"neo","full_name":"neo-project/neo","private":false,"owner":{"login":"neo-project","id":12685221,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNjg1MjIx","avatar_url":"https://avatars3.githubusercontent.com/u/12685221?v=4","gravatar_id":"","url":"https://api.github.com/users/neo-project","html_url":"https://github.com/neo-project","followers_url":"https://api.github.com/users/neo-project/followers","following_url":"https://api.github.com/users/neo-project/following{/other_user}","gists_url":"https://api.github.com/users/neo-project/gists{/gist_id}","starred_url":"https://api.github.com/users/neo-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neo-project/subscriptions","organizations_url":"https://api.github.com/users/neo-project/orgs","repos_url":"https://api.github.com/users/neo-project/repos","events_url":"https://api.github.com/users/neo-project/events{/privacy}","received_events_url":"https://api.github.com/users/neo-project/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/neo-project/neo","description":"NEO Smart Economy","fork":false,"url":"https://api.github.com/repos/neo-project/neo","forks_url":"https://api.github.com/repos/neo-project/neo/forks","keys_url":"https://api.github.com/repos/neo-project/neo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/neo-project/neo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/neo-project/neo/teams","hooks_url":"https://api.github.com/repos/neo-project/neo/hooks","issue_events_url":"https://api.github.com/repos/neo-project/neo/issues/events{/number}","events_url":"https://api.github.com/repos/neo-project/neo/events","assignees_url":"https://api.github.com/repos/neo-project/neo/assignees{/user}","branches_url":"https://api.github.com/repos/neo-project/neo/branches{/branch}","tags_url":"https://api.github.com/repos/neo-project/neo/tags","blobs_url":"https://api.github.com/repos/neo-project/neo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/neo-project/neo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/neo-project/neo/git/refs{/sha}","trees_url":"https://api.github.com/repos/neo-project/neo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/neo-project/neo/statuses/{sha}","languages_url":"https://api.github.com/repos/neo-project/neo/languages","stargazers_url":"https://api.github.com/repos/neo-project/neo/stargazers","contributors_url":"https://api.github.com/repos/neo-project/neo/contributors","subscribers_url":"https://api.github.com/repos/neo-project/neo/subscribers","subscription_url":"https://api.github.com/repos/neo-project/neo/subscription","commits_url":"https://api.github.com/repos/neo-project/neo/commits{/sha}","git_commits_url":"https://api.github.com/repos/neo-project/neo/git/commits{/sha}","comments_url":"https://api.github.com/repos/neo-project/neo/comments{/number}","issue_comment_url":"https://api.github.com/repos/neo-project/neo/issues/comments{/number}","contents_url":"https://api.github.com/repos/neo-project/neo/contents/{+path}","compare_url":"https://api.github.com/repos/neo-project/neo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/neo-project/neo/merges","archive_url":"https://api.github.com/repos/neo-project/neo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/neo-project/neo/downloads","issues_url":"https://api.github.com/repos/neo-project/neo/issues{/number}","pulls_url":"https://api.github.com/repos/neo-project/neo/pulls{/number}","milestones_url":"https://api.github.com/repos/neo-project/neo/milestones{/number}","notifications_url":"https://api.github.com/repos/neo-project/neo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/neo-project/neo/labels{/name}","releases_url":"https://api.github.com/repos/neo-project/neo/releases{/id}","deployments_url":"https://api.github.com/repos/neo-project/neo/deployments","created_at":"2015-05-31T17:02:33Z","updated_at":"2018-11-22T05:20:48Z","pushed_at":"2018-11-22T14:47:36Z","git_url":"git://github.com/neo-project/neo.git","ssh_url":"git@github.com:neo-project/neo.git","clone_url":"https://github.com/neo-project/neo.git","svn_url":"https://github.com/neo-project/neo","homepage":"","size":3301,"stargazers_count":2695,"watchers_count":2695,"language":"C#","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":856,"mirror_url":null,"archived":false,"open_issues_count":90,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":856,"open_issues":90,"watchers":2695,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/neo-project/neo/pulls/470"},"html":{"href":"https://github.com/neo-project/neo/pull/470"},"issue":{"href":"https://api.github.com/repos/neo-project/neo/issues/470"},"comments":{"href":"https://api.github.com/repos/neo-project/neo/issues/470/comments"},"review_comments":{"href":"https://api.github.com/repos/neo-project/neo/pulls/470/comments"},"review_comment":{"href":"https://api.github.com/repos/neo-project/neo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/neo-project/neo/pulls/470/commits"},"statuses":{"href":"https://api.github.com/repos/neo-project/neo/statuses/8c8d937deafa40f5e3314e410d0c0b60b30d84fc"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"shargon"}}