{"action":"created","comment":{"url":"https://api.github.com/repos/orbs-network/orbs-network/pulls/comments/191169506","pull_request_review_id":123690493,"id":191169506,"diff_hunk":"@@ -73,20 +73,25 @@ export class StubConsensus extends BaseConsensus {\n       logger.debug(`Stub consensus leader heartbeat - my last block is ${JSON.stringify(myLastCommittedBlock)}`);\n \n       // check if all other nodes are synchronized with me\n-      let areAllOtherNodesSyncedWithMe = true;\n-      if (this.lastBlockHeightByNodeName.size != this.config.clusterSize - 1) {\n+      let areEnoughNodesSyncedWithMe = true;","path":"projects/libs/core-library-typescript/src/consensus/stub-consensus.ts","position":6,"original_position":6,"commit_id":"3e5c579e2f443ff7a06206d87c20514fe93ef702","original_commit_id":"3e5c579e2f443ff7a06206d87c20514fe93ef702","user":{"login":"netoneko","id":614125,"avatar_url":"https://avatars2.githubusercontent.com/u/614125?v=4","gravatar_id":"","url":"https://api.github.com/users/netoneko","html_url":"https://github.com/netoneko","followers_url":"https://api.github.com/users/netoneko/followers","following_url":"https://api.github.com/users/netoneko/following{/other_user}","gists_url":"https://api.github.com/users/netoneko/gists{/gist_id}","starred_url":"https://api.github.com/users/netoneko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/netoneko/subscriptions","organizations_url":"https://api.github.com/users/netoneko/orgs","repos_url":"https://api.github.com/users/netoneko/repos","events_url":"https://api.github.com/users/netoneko/events{/privacy}","received_events_url":"https://api.github.com/users/netoneko/received_events","type":"User","site_admin":false},"body":"I think it would be a bit easier for us to maintain this code if we rewrote it using `filter((k, v) => v <= lastBlockSize)` and then check the size.","created_at":"2018-05-28T10:14:44Z","updated_at":"2018-05-28T10:15:12Z","html_url":"https://github.com/orbs-network/orbs-network/pull/211#discussion_r191169506","pull_request_url":"https://api.github.com/repos/orbs-network/orbs-network/pulls/211","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/orbs-network/orbs-network/pulls/comments/191169506"},"html":{"href":"https://github.com/orbs-network/orbs-network/pull/211#discussion_r191169506"},"pull_request":{"href":"https://api.github.com/repos/orbs-network/orbs-network/pulls/211"}}},"pull_request":{"url":"https://api.github.com/repos/orbs-network/orbs-network/pulls/211","id":190887897,"html_url":"https://github.com/orbs-network/orbs-network/pull/211","diff_url":"https://github.com/orbs-network/orbs-network/pull/211.diff","patch_url":"https://github.com/orbs-network/orbs-network/pull/211.patch","issue_url":"https://api.github.com/repos/orbs-network/orbs-network/issues/211","number":211,"state":"open","locked":false,"title":"allow 1 node to be out of sync before terminating stub consensus","user":{"login":"erankirsh","id":13403972,"avatar_url":"https://avatars0.githubusercontent.com/u/13403972?v=4","gravatar_id":"","url":"https://api.github.com/users/erankirsh","html_url":"https://github.com/erankirsh","followers_url":"https://api.github.com/users/erankirsh/followers","following_url":"https://api.github.com/users/erankirsh/following{/other_user}","gists_url":"https://api.github.com/users/erankirsh/gists{/gist_id}","starred_url":"https://api.github.com/users/erankirsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erankirsh/subscriptions","organizations_url":"https://api.github.com/users/erankirsh/orgs","repos_url":"https://api.github.com/users/erankirsh/repos","events_url":"https://api.github.com/users/erankirsh/events{/privacy}","received_events_url":"https://api.github.com/users/erankirsh/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-05-28T09:56:42Z","updated_at":"2018-05-28T10:15:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"014b78d62d679cd5e113ac7e72cb3fe58c096873","assignee":null,"assignees":[],"requested_reviewers":[{"login":"jlevison","id":1667420,"avatar_url":"https://avatars3.githubusercontent.com/u/1667420?v=4","gravatar_id":"","url":"https://api.github.com/users/jlevison","html_url":"https://github.com/jlevison","followers_url":"https://api.github.com/users/jlevison/followers","following_url":"https://api.github.com/users/jlevison/following{/other_user}","gists_url":"https://api.github.com/users/jlevison/gists{/gist_id}","starred_url":"https://api.github.com/users/jlevison/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jlevison/subscriptions","organizations_url":"https://api.github.com/users/jlevison/orgs","repos_url":"https://api.github.com/users/jlevison/repos","events_url":"https://api.github.com/users/jlevison/events{/privacy}","received_events_url":"https://api.github.com/users/jlevison/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/orbs-network/orbs-network/pulls/211/commits","review_comments_url":"https://api.github.com/repos/orbs-network/orbs-network/pulls/211/comments","review_comment_url":"https://api.github.com/repos/orbs-network/orbs-network/pulls/comments{/number}","comments_url":"https://api.github.com/repos/orbs-network/orbs-network/issues/211/comments","statuses_url":"https://api.github.com/repos/orbs-network/orbs-network/statuses/3e5c579e2f443ff7a06206d87c20514fe93ef702","head":{"label":"orbs-network:feature/minimum-required-stub-cons","ref":"feature/minimum-required-stub-cons","sha":"3e5c579e2f443ff7a06206d87c20514fe93ef702","user":{"login":"orbs-network","id":33665977,"avatar_url":"https://avatars3.githubusercontent.com/u/33665977?v=4","gravatar_id":"","url":"https://api.github.com/users/orbs-network","html_url":"https://github.com/orbs-network","followers_url":"https://api.github.com/users/orbs-network/followers","following_url":"https://api.github.com/users/orbs-network/following{/other_user}","gists_url":"https://api.github.com/users/orbs-network/gists{/gist_id}","starred_url":"https://api.github.com/users/orbs-network/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orbs-network/subscriptions","organizations_url":"https://api.github.com/users/orbs-network/orgs","repos_url":"https://api.github.com/users/orbs-network/repos","events_url":"https://api.github.com/users/orbs-network/events{/privacy}","received_events_url":"https://api.github.com/users/orbs-network/received_events","type":"Organization","site_admin":false},"repo":{"id":111686112,"name":"orbs-network","full_name":"orbs-network/orbs-network","owner":{"login":"orbs-network","id":33665977,"avatar_url":"https://avatars3.githubusercontent.com/u/33665977?v=4","gravatar_id":"","url":"https://api.github.com/users/orbs-network","html_url":"https://github.com/orbs-network","followers_url":"https://api.github.com/users/orbs-network/followers","following_url":"https://api.github.com/users/orbs-network/following{/other_user}","gists_url":"https://api.github.com/users/orbs-network/gists{/gist_id}","starred_url":"https://api.github.com/users/orbs-network/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orbs-network/subscriptions","organizations_url":"https://api.github.com/users/orbs-network/orgs","repos_url":"https://api.github.com/users/orbs-network/repos","events_url":"https://api.github.com/users/orbs-network/events{/privacy}","received_events_url":"https://api.github.com/users/orbs-network/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/orbs-network/orbs-network","description":"Monorepo for Orbs platform reference implementation","fork":false,"url":"https://api.github.com/repos/orbs-network/orbs-network","forks_url":"https://api.github.com/repos/orbs-network/orbs-network/forks","keys_url":"https://api.github.com/repos/orbs-network/orbs-network/keys{/key_id}","collaborators_url":"https://api.github.com/repos/orbs-network/orbs-network/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/orbs-network/orbs-network/teams","hooks_url":"https://api.github.com/repos/orbs-network/orbs-network/hooks","issue_events_url":"https://api.github.com/repos/orbs-network/orbs-network/issues/events{/number}","events_url":"https://api.github.com/repos/orbs-network/orbs-network/events","assignees_url":"https://api.github.com/repos/orbs-network/orbs-network/assignees{/user}","branches_url":"https://api.github.com/repos/orbs-network/orbs-network/branches{/branch}","tags_url":"https://api.github.com/repos/orbs-network/orbs-network/tags","blobs_url":"https://api.github.com/repos/orbs-network/orbs-network/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/orbs-network/orbs-network/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/orbs-network/orbs-network/git/refs{/sha}","trees_url":"https://api.github.com/repos/orbs-network/orbs-network/git/trees{/sha}","statuses_url":"https://api.github.com/repos/orbs-network/orbs-network/statuses/{sha}","languages_url":"https://api.github.com/repos/orbs-network/orbs-network/languages","stargazers_url":"https://api.github.com/repos/orbs-network/orbs-network/stargazers","contributors_url":"https://api.github.com/repos/orbs-network/orbs-network/contributors","subscribers_url":"https://api.github.com/repos/orbs-network/orbs-network/subscribers","subscription_url":"https://api.github.com/repos/orbs-network/orbs-network/subscription","commits_url":"https://api.github.com/repos/orbs-network/orbs-network/commits{/sha}","git_commits_url":"https://api.github.com/repos/orbs-network/orbs-network/git/commits{/sha}","comments_url":"https://api.github.com/repos/orbs-network/orbs-network/comments{/number}","issue_comment_url":"https://api.github.com/repos/orbs-network/orbs-network/issues/comments{/number}","contents_url":"https://api.github.com/repos/orbs-network/orbs-network/contents/{+path}","compare_url":"https://api.github.com/repos/orbs-network/orbs-network/compare/{base}...{head}","merges_url":"https://api.github.com/repos/orbs-network/orbs-network/merges","archive_url":"https://api.github.com/repos/orbs-network/orbs-network/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/orbs-network/orbs-network/downloads","issues_url":"https://api.github.com/repos/orbs-network/orbs-network/issues{/number}","pulls_url":"https://api.github.com/repos/orbs-network/orbs-network/pulls{/number}","milestones_url":"https://api.github.com/repos/orbs-network/orbs-network/milestones{/number}","notifications_url":"https://api.github.com/repos/orbs-network/orbs-network/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/orbs-network/orbs-network/labels{/name}","releases_url":"https://api.github.com/repos/orbs-network/orbs-network/releases{/id}","deployments_url":"https://api.github.com/repos/orbs-network/orbs-network/deployments","created_at":"2017-11-22T13:14:22Z","updated_at":"2018-05-28T10:10:31Z","pushed_at":"2018-05-28T10:10:28Z","git_url":"git://github.com/orbs-network/orbs-network.git","ssh_url":"git@github.com:orbs-network/orbs-network.git","clone_url":"https://github.com/orbs-network/orbs-network.git","svn_url":"https://github.com/orbs-network/orbs-network","homepage":"","size":6554,"stargazers_count":20,"watchers_count":20,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":4,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":4,"open_issues":4,"watchers":20,"default_branch":"master"}},"base":{"label":"orbs-network:master","ref":"master","sha":"4a10cbd2dffeb4e1a0a61a39624ca50e511853ff","user":{"login":"orbs-network","id":33665977,"avatar_url":"https://avatars3.githubusercontent.com/u/33665977?v=4","gravatar_id":"","url":"https://api.github.com/users/orbs-network","html_url":"https://github.com/orbs-network","followers_url":"https://api.github.com/users/orbs-network/followers","following_url":"https://api.github.com/users/orbs-network/following{/other_user}","gists_url":"https://api.github.com/users/orbs-network/gists{/gist_id}","starred_url":"https://api.github.com/users/orbs-network/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orbs-network/subscriptions","organizations_url":"https://api.github.com/users/orbs-network/orgs","repos_url":"https://api.github.com/users/orbs-network/repos","events_url":"https://api.github.com/users/orbs-network/events{/privacy}","received_events_url":"https://api.github.com/users/orbs-network/received_events","type":"Organization","site_admin":false},"repo":{"id":111686112,"name":"orbs-network","full_name":"orbs-network/orbs-network","owner":{"login":"orbs-network","id":33665977,"avatar_url":"https://avatars3.githubusercontent.com/u/33665977?v=4","gravatar_id":"","url":"https://api.github.com/users/orbs-network","html_url":"https://github.com/orbs-network","followers_url":"https://api.github.com/users/orbs-network/followers","following_url":"https://api.github.com/users/orbs-network/following{/other_user}","gists_url":"https://api.github.com/users/orbs-network/gists{/gist_id}","starred_url":"https://api.github.com/users/orbs-network/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orbs-network/subscriptions","organizations_url":"https://api.github.com/users/orbs-network/orgs","repos_url":"https://api.github.com/users/orbs-network/repos","events_url":"https://api.github.com/users/orbs-network/events{/privacy}","received_events_url":"https://api.github.com/users/orbs-network/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/orbs-network/orbs-network","description":"Monorepo for Orbs platform reference implementation","fork":false,"url":"https://api.github.com/repos/orbs-network/orbs-network","forks_url":"https://api.github.com/repos/orbs-network/orbs-network/forks","keys_url":"https://api.github.com/repos/orbs-network/orbs-network/keys{/key_id}","collaborators_url":"https://api.github.com/repos/orbs-network/orbs-network/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/orbs-network/orbs-network/teams","hooks_url":"https://api.github.com/repos/orbs-network/orbs-network/hooks","issue_events_url":"https://api.github.com/repos/orbs-network/orbs-network/issues/events{/number}","events_url":"https://api.github.com/repos/orbs-network/orbs-network/events","assignees_url":"https://api.github.com/repos/orbs-network/orbs-network/assignees{/user}","branches_url":"https://api.github.com/repos/orbs-network/orbs-network/branches{/branch}","tags_url":"https://api.github.com/repos/orbs-network/orbs-network/tags","blobs_url":"https://api.github.com/repos/orbs-network/orbs-network/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/orbs-network/orbs-network/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/orbs-network/orbs-network/git/refs{/sha}","trees_url":"https://api.github.com/repos/orbs-network/orbs-network/git/trees{/sha}","statuses_url":"https://api.github.com/repos/orbs-network/orbs-network/statuses/{sha}","languages_url":"https://api.github.com/repos/orbs-network/orbs-network/languages","stargazers_url":"https://api.github.com/repos/orbs-network/orbs-network/stargazers","contributors_url":"https://api.github.com/repos/orbs-network/orbs-network/contributors","subscribers_url":"https://api.github.com/repos/orbs-network/orbs-network/subscribers","subscription_url":"https://api.github.com/repos/orbs-network/orbs-network/subscription","commits_url":"https://api.github.com/repos/orbs-network/orbs-network/commits{/sha}","git_commits_url":"https://api.github.com/repos/orbs-network/orbs-network/git/commits{/sha}","comments_url":"https://api.github.com/repos/orbs-network/orbs-network/comments{/number}","issue_comment_url":"https://api.github.com/repos/orbs-network/orbs-network/issues/comments{/number}","contents_url":"https://api.github.com/repos/orbs-network/orbs-network/contents/{+path}","compare_url":"https://api.github.com/repos/orbs-network/orbs-network/compare/{base}...{head}","merges_url":"https://api.github.com/repos/orbs-network/orbs-network/merges","archive_url":"https://api.github.com/repos/orbs-network/orbs-network/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/orbs-network/orbs-network/downloads","issues_url":"https://api.github.com/repos/orbs-network/orbs-network/issues{/number}","pulls_url":"https://api.github.com/repos/orbs-network/orbs-network/pulls{/number}","milestones_url":"https://api.github.com/repos/orbs-network/orbs-network/milestones{/number}","notifications_url":"https://api.github.com/repos/orbs-network/orbs-network/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/orbs-network/orbs-network/labels{/name}","releases_url":"https://api.github.com/repos/orbs-network/orbs-network/releases{/id}","deployments_url":"https://api.github.com/repos/orbs-network/orbs-network/deployments","created_at":"2017-11-22T13:14:22Z","updated_at":"2018-05-28T10:10:31Z","pushed_at":"2018-05-28T10:10:28Z","git_url":"git://github.com/orbs-network/orbs-network.git","ssh_url":"git@github.com:orbs-network/orbs-network.git","clone_url":"https://github.com/orbs-network/orbs-network.git","svn_url":"https://github.com/orbs-network/orbs-network","homepage":"","size":6554,"stargazers_count":20,"watchers_count":20,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":4,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":4,"open_issues":4,"watchers":20,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/orbs-network/orbs-network/pulls/211"},"html":{"href":"https://github.com/orbs-network/orbs-network/pull/211"},"issue":{"href":"https://api.github.com/repos/orbs-network/orbs-network/issues/211"},"comments":{"href":"https://api.github.com/repos/orbs-network/orbs-network/issues/211/comments"},"review_comments":{"href":"https://api.github.com/repos/orbs-network/orbs-network/pulls/211/comments"},"review_comment":{"href":"https://api.github.com/repos/orbs-network/orbs-network/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/orbs-network/orbs-network/pulls/211/commits"},"statuses":{"href":"https://api.github.com/repos/orbs-network/orbs-network/statuses/3e5c579e2f443ff7a06206d87c20514fe93ef702"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"netoneko"}}