{"action":"created","comment":{"url":"https://api.github.com/repos/hyperledger/iroha/pulls/comments/175692978","pull_request_review_id":105262008,"id":175692978,"diff_hunk":"@@ -42,28 +48,32 @@ namespace iroha {\n             block_loader_(std::move(block_loader)),\n             delay_(delay) {\n         log_ = logger::log(\"YacGate\");\n-        block_creator_->on_block().subscribe([this](auto block) {\n-          this->vote(*std::unique_ptr<iroha::model::Block>(block->makeOldModel()));\n-        });\n+        block_creator_->on_block().subscribe(\n+            [this](auto block) { this->vote(*block); });\n       }\n \n-      void YacGateImpl::vote(model::Block block) {\n-        auto hash = hash_provider_->makeHash(block);\n+      void YacGateImpl::vote(const shared_model::interface::Block &block) {\n+        std::unique_ptr<model::Block> bl(block.makeOldModel());\n+        auto hash = hash_provider_->makeHash(*bl);\n         log_->info(\n-            \"vote for block ({}, {})\", hash.proposal_hash, hash.block_hash);\n+            \"vote for block ({}, {})\", hash.proposal_hash, block.hash().toString());","path":"irohad/consensus/yac/impl/yac_gate_impl.cpp","position":38,"original_position":38,"commit_id":"a93cc9d1fc1af200b6844eb1b6dd006ad558b6cd","original_commit_id":"a93cc9d1fc1af200b6844eb1b6dd006ad558b6cd","user":{"login":"x3medima17","id":750115,"avatar_url":"https://avatars0.githubusercontent.com/u/750115?v=4","gravatar_id":"","url":"https://api.github.com/users/x3medima17","html_url":"https://github.com/x3medima17","followers_url":"https://api.github.com/users/x3medima17/followers","following_url":"https://api.github.com/users/x3medima17/following{/other_user}","gists_url":"https://api.github.com/users/x3medima17/gists{/gist_id}","starred_url":"https://api.github.com/users/x3medima17/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/x3medima17/subscriptions","organizations_url":"https://api.github.com/users/x3medima17/orgs","repos_url":"https://api.github.com/users/x3medima17/repos","events_url":"https://api.github.com/users/x3medima17/events{/privacy}","received_events_url":"https://api.github.com/users/x3medima17/received_events","type":"User","site_admin":false},"body":"Will change it in the next PR","created_at":"2018-03-20T09:06:21Z","updated_at":"2018-03-20T09:06:21Z","html_url":"https://github.com/hyperledger/iroha/pull/1050#discussion_r175692978","pull_request_url":"https://api.github.com/repos/hyperledger/iroha/pulls/1050","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/hyperledger/iroha/pulls/comments/175692978"},"html":{"href":"https://github.com/hyperledger/iroha/pull/1050#discussion_r175692978"},"pull_request":{"href":"https://api.github.com/repos/hyperledger/iroha/pulls/1050"}},"in_reply_to_id":175660042},"pull_request":{"url":"https://api.github.com/repos/hyperledger/iroha/pulls/1050","id":173425658,"html_url":"https://github.com/hyperledger/iroha/pull/1050","diff_url":"https://github.com/hyperledger/iroha/pull/1050.diff","patch_url":"https://github.com/hyperledger/iroha/pull/1050.patch","issue_url":"https://api.github.com/repos/hyperledger/iroha/issues/1050","number":1050,"state":"open","locked":false,"title":"Shared model/new consensus gate","user":{"login":"x3medima17","id":750115,"avatar_url":"https://avatars0.githubusercontent.com/u/750115?v=4","gravatar_id":"","url":"https://api.github.com/users/x3medima17","html_url":"https://github.com/x3medima17","followers_url":"https://api.github.com/users/x3medima17/followers","following_url":"https://api.github.com/users/x3medima17/following{/other_user}","gists_url":"https://api.github.com/users/x3medima17/gists{/gist_id}","starred_url":"https://api.github.com/users/x3medima17/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/x3medima17/subscriptions","organizations_url":"https://api.github.com/users/x3medima17/orgs","repos_url":"https://api.github.com/users/x3medima17/repos","events_url":"https://api.github.com/users/x3medima17/events{/privacy}","received_events_url":"https://api.github.com/users/x3medima17/received_events","type":"User","site_admin":false},"body":"<!-- You will not see HTML commented line in Pull Request body -->\r\n<!-- Optional sections may be omitted. Just remove them or write None -->\r\n\r\n<!-- ### Requirements -->\r\n<!-- * Filling out the template is required. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion. -->\r\n<!-- * All new code must have code coverage above 70% (https://docs.codecov.io/docs/about-code-coverage). -->\r\n<!-- * CircleCI builds must be passed. -->\r\n<!-- * Critical and blocker issues reported by Sorabot must be fixed. -->\r\n<!-- * Branch must be rebased onto base branch (https://soramitsu.atlassian.net/wiki/spaces/IS/pages/11173889/Rebase+and+merge+guide). -->\r\n\r\n\r\n### Description of the Change\r\nMigrate consensus gate to the new model\r\n<!-- We must be able to understand the design of your change from this description. If we can't get a good idea of what the code will be doing from the description here, the pull request may be closed at the maintainers' discretion. -->\r\n<!-- Keep in mind that the maintainer reviewing this PR may not be familiar with or have worked with the code here recently, so please walk us through the concepts. -->\r\n\r\n### Benefits\r\nLess dependency on old model\r\n<!-- What benefits will be realized by the code change? -->\r\n\r\n### Possible Drawbacks \r\nNone\r\n<!-- What are the possible side-effects or negative impacts of the code change? -->\r\n<!-- If no drawbacks, explicitly mention this (write None) -->\r\n","created_at":"2018-03-07T11:34:20Z","updated_at":"2018-03-20T09:06:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d399aa01bf66a55c5d6a064f42d961910373544a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":853992875,"url":"https://api.github.com/repos/hyperledger/iroha/labels/in%20progress","name":"in progress","color":"ededed","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/hyperledger/iroha/pulls/1050/commits","review_comments_url":"https://api.github.com/repos/hyperledger/iroha/pulls/1050/comments","review_comment_url":"https://api.github.com/repos/hyperledger/iroha/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hyperledger/iroha/issues/1050/comments","statuses_url":"https://api.github.com/repos/hyperledger/iroha/statuses/a93cc9d1fc1af200b6844eb1b6dd006ad558b6cd","head":{"label":"hyperledger:shared_model/new-consensus-gate","ref":"shared_model/new-consensus-gate","sha":"a93cc9d1fc1af200b6844eb1b6dd006ad558b6cd","user":{"login":"hyperledger","id":7657900,"avatar_url":"https://avatars2.githubusercontent.com/u/7657900?v=4","gravatar_id":"","url":"https://api.github.com/users/hyperledger","html_url":"https://github.com/hyperledger","followers_url":"https://api.github.com/users/hyperledger/followers","following_url":"https://api.github.com/users/hyperledger/following{/other_user}","gists_url":"https://api.github.com/users/hyperledger/gists{/gist_id}","starred_url":"https://api.github.com/users/hyperledger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hyperledger/subscriptions","organizations_url":"https://api.github.com/users/hyperledger/orgs","repos_url":"https://api.github.com/users/hyperledger/repos","events_url":"https://api.github.com/users/hyperledger/events{/privacy}","received_events_url":"https://api.github.com/users/hyperledger/received_events","type":"Organization","site_admin":false},"repo":{"id":67340575,"name":"iroha","full_name":"hyperledger/iroha","owner":{"login":"hyperledger","id":7657900,"avatar_url":"https://avatars2.githubusercontent.com/u/7657900?v=4","gravatar_id":"","url":"https://api.github.com/users/hyperledger","html_url":"https://github.com/hyperledger","followers_url":"https://api.github.com/users/hyperledger/followers","following_url":"https://api.github.com/users/hyperledger/following{/other_user}","gists_url":"https://api.github.com/users/hyperledger/gists{/gist_id}","starred_url":"https://api.github.com/users/hyperledger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hyperledger/subscriptions","organizations_url":"https://api.github.com/users/hyperledger/orgs","repos_url":"https://api.github.com/users/hyperledger/repos","events_url":"https://api.github.com/users/hyperledger/events{/privacy}","received_events_url":"https://api.github.com/users/hyperledger/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hyperledger/iroha","description":"Iroha - A simple, decentralized ledger","fork":false,"url":"https://api.github.com/repos/hyperledger/iroha","forks_url":"https://api.github.com/repos/hyperledger/iroha/forks","keys_url":"https://api.github.com/repos/hyperledger/iroha/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hyperledger/iroha/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hyperledger/iroha/teams","hooks_url":"https://api.github.com/repos/hyperledger/iroha/hooks","issue_events_url":"https://api.github.com/repos/hyperledger/iroha/issues/events{/number}","events_url":"https://api.github.com/repos/hyperledger/iroha/events","assignees_url":"https://api.github.com/repos/hyperledger/iroha/assignees{/user}","branches_url":"https://api.github.com/repos/hyperledger/iroha/branches{/branch}","tags_url":"https://api.github.com/repos/hyperledger/iroha/tags","blobs_url":"https://api.github.com/repos/hyperledger/iroha/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hyperledger/iroha/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hyperledger/iroha/git/refs{/sha}","trees_url":"https://api.github.com/repos/hyperledger/iroha/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hyperledger/iroha/statuses/{sha}","languages_url":"https://api.github.com/repos/hyperledger/iroha/languages","stargazers_url":"https://api.github.com/repos/hyperledger/iroha/stargazers","contributors_url":"https://api.github.com/repos/hyperledger/iroha/contributors","subscribers_url":"https://api.github.com/repos/hyperledger/iroha/subscribers","subscription_url":"https://api.github.com/repos/hyperledger/iroha/subscription","commits_url":"https://api.github.com/repos/hyperledger/iroha/commits{/sha}","git_commits_url":"https://api.github.com/repos/hyperledger/iroha/git/commits{/sha}","comments_url":"https://api.github.com/repos/hyperledger/iroha/comments{/number}","issue_comment_url":"https://api.github.com/repos/hyperledger/iroha/issues/comments{/number}","contents_url":"https://api.github.com/repos/hyperledger/iroha/contents/{+path}","compare_url":"https://api.github.com/repos/hyperledger/iroha/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hyperledger/iroha/merges","archive_url":"https://api.github.com/repos/hyperledger/iroha/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hyperledger/iroha/downloads","issues_url":"https://api.github.com/repos/hyperledger/iroha/issues{/number}","pulls_url":"https://api.github.com/repos/hyperledger/iroha/pulls{/number}","milestones_url":"https://api.github.com/repos/hyperledger/iroha/milestones{/number}","notifications_url":"https://api.github.com/repos/hyperledger/iroha/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hyperledger/iroha/labels{/name}","releases_url":"https://api.github.com/repos/hyperledger/iroha/releases{/id}","deployments_url":"https://api.github.com/repos/hyperledger/iroha/deployments","created_at":"2016-09-04T11:17:53Z","updated_at":"2018-03-20T08:32:26Z","pushed_at":"2018-03-20T09:00:17Z","git_url":"git://github.com/hyperledger/iroha.git","ssh_url":"git@github.com:hyperledger/iroha.git","clone_url":"https://github.com/hyperledger/iroha.git","svn_url":"https://github.com/hyperledger/iroha","homepage":"http://iroha.tech","size":45805,"stargazers_count":682,"watchers_count":682,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":216,"mirror_url":null,"archived":false,"open_issues_count":61,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":216,"open_issues":61,"watchers":682,"default_branch":"master"}},"base":{"label":"hyperledger:develop","ref":"develop","sha":"dabf621f8ed05a51caeac975f9d63be3871615b1","user":{"login":"hyperledger","id":7657900,"avatar_url":"https://avatars2.githubusercontent.com/u/7657900?v=4","gravatar_id":"","url":"https://api.github.com/users/hyperledger","html_url":"https://github.com/hyperledger","followers_url":"https://api.github.com/users/hyperledger/followers","following_url":"https://api.github.com/users/hyperledger/following{/other_user}","gists_url":"https://api.github.com/users/hyperledger/gists{/gist_id}","starred_url":"https://api.github.com/users/hyperledger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hyperledger/subscriptions","organizations_url":"https://api.github.com/users/hyperledger/orgs","repos_url":"https://api.github.com/users/hyperledger/repos","events_url":"https://api.github.com/users/hyperledger/events{/privacy}","received_events_url":"https://api.github.com/users/hyperledger/received_events","type":"Organization","site_admin":false},"repo":{"id":67340575,"name":"iroha","full_name":"hyperledger/iroha","owner":{"login":"hyperledger","id":7657900,"avatar_url":"https://avatars2.githubusercontent.com/u/7657900?v=4","gravatar_id":"","url":"https://api.github.com/users/hyperledger","html_url":"https://github.com/hyperledger","followers_url":"https://api.github.com/users/hyperledger/followers","following_url":"https://api.github.com/users/hyperledger/following{/other_user}","gists_url":"https://api.github.com/users/hyperledger/gists{/gist_id}","starred_url":"https://api.github.com/users/hyperledger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hyperledger/subscriptions","organizations_url":"https://api.github.com/users/hyperledger/orgs","repos_url":"https://api.github.com/users/hyperledger/repos","events_url":"https://api.github.com/users/hyperledger/events{/privacy}","received_events_url":"https://api.github.com/users/hyperledger/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hyperledger/iroha","description":"Iroha - A simple, decentralized ledger","fork":false,"url":"https://api.github.com/repos/hyperledger/iroha","forks_url":"https://api.github.com/repos/hyperledger/iroha/forks","keys_url":"https://api.github.com/repos/hyperledger/iroha/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hyperledger/iroha/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hyperledger/iroha/teams","hooks_url":"https://api.github.com/repos/hyperledger/iroha/hooks","issue_events_url":"https://api.github.com/repos/hyperledger/iroha/issues/events{/number}","events_url":"https://api.github.com/repos/hyperledger/iroha/events","assignees_url":"https://api.github.com/repos/hyperledger/iroha/assignees{/user}","branches_url":"https://api.github.com/repos/hyperledger/iroha/branches{/branch}","tags_url":"https://api.github.com/repos/hyperledger/iroha/tags","blobs_url":"https://api.github.com/repos/hyperledger/iroha/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hyperledger/iroha/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hyperledger/iroha/git/refs{/sha}","trees_url":"https://api.github.com/repos/hyperledger/iroha/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hyperledger/iroha/statuses/{sha}","languages_url":"https://api.github.com/repos/hyperledger/iroha/languages","stargazers_url":"https://api.github.com/repos/hyperledger/iroha/stargazers","contributors_url":"https://api.github.com/repos/hyperledger/iroha/contributors","subscribers_url":"https://api.github.com/repos/hyperledger/iroha/subscribers","subscription_url":"https://api.github.com/repos/hyperledger/iroha/subscription","commits_url":"https://api.github.com/repos/hyperledger/iroha/commits{/sha}","git_commits_url":"https://api.github.com/repos/hyperledger/iroha/git/commits{/sha}","comments_url":"https://api.github.com/repos/hyperledger/iroha/comments{/number}","issue_comment_url":"https://api.github.com/repos/hyperledger/iroha/issues/comments{/number}","contents_url":"https://api.github.com/repos/hyperledger/iroha/contents/{+path}","compare_url":"https://api.github.com/repos/hyperledger/iroha/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hyperledger/iroha/merges","archive_url":"https://api.github.com/repos/hyperledger/iroha/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hyperledger/iroha/downloads","issues_url":"https://api.github.com/repos/hyperledger/iroha/issues{/number}","pulls_url":"https://api.github.com/repos/hyperledger/iroha/pulls{/number}","milestones_url":"https://api.github.com/repos/hyperledger/iroha/milestones{/number}","notifications_url":"https://api.github.com/repos/hyperledger/iroha/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hyperledger/iroha/labels{/name}","releases_url":"https://api.github.com/repos/hyperledger/iroha/releases{/id}","deployments_url":"https://api.github.com/repos/hyperledger/iroha/deployments","created_at":"2016-09-04T11:17:53Z","updated_at":"2018-03-20T08:32:26Z","pushed_at":"2018-03-20T09:00:17Z","git_url":"git://github.com/hyperledger/iroha.git","ssh_url":"git@github.com:hyperledger/iroha.git","clone_url":"https://github.com/hyperledger/iroha.git","svn_url":"https://github.com/hyperledger/iroha","homepage":"http://iroha.tech","size":45805,"stargazers_count":682,"watchers_count":682,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":216,"mirror_url":null,"archived":false,"open_issues_count":61,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":216,"open_issues":61,"watchers":682,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hyperledger/iroha/pulls/1050"},"html":{"href":"https://github.com/hyperledger/iroha/pull/1050"},"issue":{"href":"https://api.github.com/repos/hyperledger/iroha/issues/1050"},"comments":{"href":"https://api.github.com/repos/hyperledger/iroha/issues/1050/comments"},"review_comments":{"href":"https://api.github.com/repos/hyperledger/iroha/pulls/1050/comments"},"review_comment":{"href":"https://api.github.com/repos/hyperledger/iroha/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hyperledger/iroha/pulls/1050/commits"},"statuses":{"href":"https://api.github.com/repos/hyperledger/iroha/statuses/a93cc9d1fc1af200b6844eb1b6dd006ad558b6cd"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"x3medima17"}}