{"action":"created","comment":{"url":"https://api.github.com/repos/GolosChain/golos/pulls/comments/199116333","pull_request_review_id":133172657,"id":199116333,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5OTExNjMzMw==","diff_hunk":"@@ -352,32 +353,34 @@ namespace chain {\n         try {\n             ilog(\"Opening shared memory from ${path}\", (\"path\", my->shared_memory_dir.generic_string()));\n             my->db.open(data_dir, my->shared_memory_dir, STEEMIT_INIT_SUPPLY, my->shared_memory_size, chainbase::database::read_write/*, my->validate_invariants*/ );\n-            auto head_block_log = my->db.get_block_log().head();\n-            if (my->replay_if_struct_changed) {\n-                my->replay |= head_block_log && my->db.revision() != head_block_log->block_num();\n-            }\n-            \n-            if (my->replay) {\n-                my->replay_db(data_dir, my->force_replay);\n-            }\n         } catch (const golos::chain::database_revision_exception &) {\n-            wlog(\"Error opening database, attempting to replay blockchain.\");\n-            my->force_replay |= my->db.revision() >= my->db.head_block_num();\n-\n-            try {\n-                my->replay_db(data_dir, my->force_replay);\n-            } catch (const golos::chain::block_log_exception &) {\n-                wlog(\"Error opening block log. Having to resync from network...\");\n-                my->wipe_db(data_dir, true);\n+            if (my->replay_if_corrupted) {\n+                wlog(\"Error opening database, attempting to replay blockchain.\");\n+                my->force_replay |= my->db.revision() >= my->db.head_block_num();\n+                try {\n+                    my->replay_db(data_dir, my->force_replay);\n+                } catch (const golos::chain::block_log_exception &) {\n+                    wlog(\"Error opening block log. Having to resync from network...\");\n+                    my->wipe_db(data_dir, true);\n+                }\n+            } else {\n+                wlog(\"Error opening database, quiting. If should replay, set replay-if-corrupted in config.ini to true.\");\n+                std::exit(0);","path":"plugins/chain/plugin.cpp","position":64,"original_position":69,"commit_id":"2b58fca420b80ddff40179415fdc417147dd0373","original_commit_id":"ef889b9d7a78e6462e659e8dc39ce798616f7bc1","user":{"login":"maslenitsa93","id":37937906,"node_id":"MDQ6VXNlcjM3OTM3OTA2","avatar_url":"https://avatars2.githubusercontent.com/u/37937906?v=4","gravatar_id":"","url":"https://api.github.com/users/maslenitsa93","html_url":"https://github.com/maslenitsa93","followers_url":"https://api.github.com/users/maslenitsa93/followers","following_url":"https://api.github.com/users/maslenitsa93/following{/other_user}","gists_url":"https://api.github.com/users/maslenitsa93/gists{/gist_id}","starred_url":"https://api.github.com/users/maslenitsa93/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maslenitsa93/subscriptions","organizations_url":"https://api.github.com/users/maslenitsa93/orgs","repos_url":"https://api.github.com/users/maslenitsa93/repos","events_url":"https://api.github.com/users/maslenitsa93/events{/privacy}","received_events_url":"https://api.github.com/users/maslenitsa93/received_events","type":"User","site_admin":false},"body":"@afalaleev  @leinlawun I debugged all in GDB and I researched how to solve problem:\r\n1) shutdown()+quit()+return\r\n2) In application.cpp, inside application::exec(), should not be called the last `shutdown()`.\r\nMy suggestion: create a bool flag in `application` which will store info is already shutted down or no, and if yes - don't do it again. What do you think?","created_at":"2018-06-29T10:16:40Z","updated_at":"2018-06-29T10:16:40Z","html_url":"https://github.com/GolosChain/golos/pull/779#discussion_r199116333","pull_request_url":"https://api.github.com/repos/GolosChain/golos/pulls/779","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/GolosChain/golos/pulls/comments/199116333"},"html":{"href":"https://github.com/GolosChain/golos/pull/779#discussion_r199116333"},"pull_request":{"href":"https://api.github.com/repos/GolosChain/golos/pulls/779"}},"in_reply_to_id":199078374},"pull_request":{"url":"https://api.github.com/repos/GolosChain/golos/pulls/779","id":197989028,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk3OTg5MDI4","html_url":"https://github.com/GolosChain/golos/pull/779","diff_url":"https://github.com/GolosChain/golos/pull/779.diff","patch_url":"https://github.com/GolosChain/golos/pull/779.patch","issue_url":"https://api.github.com/repos/GolosChain/golos/issues/779","number":779,"state":"open","locked":false,"title":"Database replaying improvements #771","user":{"login":"maslenitsa93","id":37937906,"node_id":"MDQ6VXNlcjM3OTM3OTA2","avatar_url":"https://avatars2.githubusercontent.com/u/37937906?v=4","gravatar_id":"","url":"https://api.github.com/users/maslenitsa93","html_url":"https://github.com/maslenitsa93","followers_url":"https://api.github.com/users/maslenitsa93/followers","following_url":"https://api.github.com/users/maslenitsa93/following{/other_user}","gists_url":"https://api.github.com/users/maslenitsa93/gists{/gist_id}","starred_url":"https://api.github.com/users/maslenitsa93/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maslenitsa93/subscriptions","organizations_url":"https://api.github.com/users/maslenitsa93/orgs","repos_url":"https://api.github.com/users/maslenitsa93/repos","events_url":"https://api.github.com/users/maslenitsa93/events{/privacy}","received_events_url":"https://api.github.com/users/maslenitsa93/received_events","type":"User","site_admin":false},"body":"https://github.com/GolosChain/golos/issues/771","created_at":"2018-06-28T10:44:15Z","updated_at":"2018-06-29T10:16:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8ad567f35530db5e811a3829726f93393e93409d","assignee":{"login":"maslenitsa93","id":37937906,"node_id":"MDQ6VXNlcjM3OTM3OTA2","avatar_url":"https://avatars2.githubusercontent.com/u/37937906?v=4","gravatar_id":"","url":"https://api.github.com/users/maslenitsa93","html_url":"https://github.com/maslenitsa93","followers_url":"https://api.github.com/users/maslenitsa93/followers","following_url":"https://api.github.com/users/maslenitsa93/following{/other_user}","gists_url":"https://api.github.com/users/maslenitsa93/gists{/gist_id}","starred_url":"https://api.github.com/users/maslenitsa93/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maslenitsa93/subscriptions","organizations_url":"https://api.github.com/users/maslenitsa93/orgs","repos_url":"https://api.github.com/users/maslenitsa93/repos","events_url":"https://api.github.com/users/maslenitsa93/events{/privacy}","received_events_url":"https://api.github.com/users/maslenitsa93/received_events","type":"User","site_admin":false},"assignees":[{"login":"maslenitsa93","id":37937906,"node_id":"MDQ6VXNlcjM3OTM3OTA2","avatar_url":"https://avatars2.githubusercontent.com/u/37937906?v=4","gravatar_id":"","url":"https://api.github.com/users/maslenitsa93","html_url":"https://github.com/maslenitsa93","followers_url":"https://api.github.com/users/maslenitsa93/followers","following_url":"https://api.github.com/users/maslenitsa93/following{/other_user}","gists_url":"https://api.github.com/users/maslenitsa93/gists{/gist_id}","starred_url":"https://api.github.com/users/maslenitsa93/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maslenitsa93/subscriptions","organizations_url":"https://api.github.com/users/maslenitsa93/orgs","repos_url":"https://api.github.com/users/maslenitsa93/repos","events_url":"https://api.github.com/users/maslenitsa93/events{/privacy}","received_events_url":"https://api.github.com/users/maslenitsa93/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":524164824,"node_id":"MDU6TGFiZWw1MjQxNjQ4MjQ=","url":"https://api.github.com/repos/GolosChain/golos/labels/core","name":"core","color":"e99695","default":false},{"id":419483125,"node_id":"MDU6TGFiZWw0MTk0ODMxMjU=","url":"https://api.github.com/repos/GolosChain/golos/labels/enhancement","name":"enhancement","color":"cccccc","default":true},{"id":863350639,"node_id":"MDU6TGFiZWw4NjMzNTA2Mzk=","url":"https://api.github.com/repos/GolosChain/golos/labels/medium","name":"medium","color":"f8ffb2","default":false},{"id":706764818,"node_id":"MDU6TGFiZWw3MDY3NjQ4MTg=","url":"https://api.github.com/repos/GolosChain/golos/labels/softfork","name":"softfork","color":"0052cc","default":false}],"milestone":{"url":"https://api.github.com/repos/GolosChain/golos/milestones/20","html_url":"https://github.com/GolosChain/golos/milestone/20","labels_url":"https://api.github.com/repos/GolosChain/golos/milestones/20/labels","id":3443715,"node_id":"MDk6TWlsZXN0b25lMzQ0MzcxNQ==","number":20,"title":"0.18.1","description":"","creator":{"login":"afalaleev","id":27198658,"node_id":"MDQ6VXNlcjI3MTk4NjU4","avatar_url":"https://avatars0.githubusercontent.com/u/27198658?v=4","gravatar_id":"","url":"https://api.github.com/users/afalaleev","html_url":"https://github.com/afalaleev","followers_url":"https://api.github.com/users/afalaleev/followers","following_url":"https://api.github.com/users/afalaleev/following{/other_user}","gists_url":"https://api.github.com/users/afalaleev/gists{/gist_id}","starred_url":"https://api.github.com/users/afalaleev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/afalaleev/subscriptions","organizations_url":"https://api.github.com/users/afalaleev/orgs","repos_url":"https://api.github.com/users/afalaleev/repos","events_url":"https://api.github.com/users/afalaleev/events{/privacy}","received_events_url":"https://api.github.com/users/afalaleev/received_events","type":"User","site_admin":false},"open_issues":6,"closed_issues":16,"state":"open","created_at":"2018-06-22T02:43:20Z","updated_at":"2018-06-29T10:03:41Z","due_on":"2018-06-29T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/GolosChain/golos/pulls/779/commits","review_comments_url":"https://api.github.com/repos/GolosChain/golos/pulls/779/comments","review_comment_url":"https://api.github.com/repos/GolosChain/golos/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GolosChain/golos/issues/779/comments","statuses_url":"https://api.github.com/repos/GolosChain/golos/statuses/2b58fca420b80ddff40179415fdc417147dd0373","head":{"label":"GolosChain:771-database-replaying-improvements","ref":"771-database-replaying-improvements","sha":"2b58fca420b80ddff40179415fdc417147dd0373","user":{"login":"GolosChain","id":20841297,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwODQxMjk3","avatar_url":"https://avatars0.githubusercontent.com/u/20841297?v=4","gravatar_id":"","url":"https://api.github.com/users/GolosChain","html_url":"https://github.com/GolosChain","followers_url":"https://api.github.com/users/GolosChain/followers","following_url":"https://api.github.com/users/GolosChain/following{/other_user}","gists_url":"https://api.github.com/users/GolosChain/gists{/gist_id}","starred_url":"https://api.github.com/users/GolosChain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GolosChain/subscriptions","organizations_url":"https://api.github.com/users/GolosChain/orgs","repos_url":"https://api.github.com/users/GolosChain/repos","events_url":"https://api.github.com/users/GolosChain/events{/privacy}","received_events_url":"https://api.github.com/users/GolosChain/received_events","type":"Organization","site_admin":false},"repo":{"id":64941501,"node_id":"MDEwOlJlcG9zaXRvcnk2NDk0MTUwMQ==","name":"golos","full_name":"GolosChain/golos","owner":{"login":"GolosChain","id":20841297,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwODQxMjk3","avatar_url":"https://avatars0.githubusercontent.com/u/20841297?v=4","gravatar_id":"","url":"https://api.github.com/users/GolosChain","html_url":"https://github.com/GolosChain","followers_url":"https://api.github.com/users/GolosChain/followers","following_url":"https://api.github.com/users/GolosChain/following{/other_user}","gists_url":"https://api.github.com/users/GolosChain/gists{/gist_id}","starred_url":"https://api.github.com/users/GolosChain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GolosChain/subscriptions","organizations_url":"https://api.github.com/users/GolosChain/orgs","repos_url":"https://api.github.com/users/GolosChain/repos","events_url":"https://api.github.com/users/GolosChain/events{/privacy}","received_events_url":"https://api.github.com/users/GolosChain/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GolosChain/golos","description":"Socio-economic mediablockchain","fork":true,"url":"https://api.github.com/repos/GolosChain/golos","forks_url":"https://api.github.com/repos/GolosChain/golos/forks","keys_url":"https://api.github.com/repos/GolosChain/golos/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GolosChain/golos/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GolosChain/golos/teams","hooks_url":"https://api.github.com/repos/GolosChain/golos/hooks","issue_events_url":"https://api.github.com/repos/GolosChain/golos/issues/events{/number}","events_url":"https://api.github.com/repos/GolosChain/golos/events","assignees_url":"https://api.github.com/repos/GolosChain/golos/assignees{/user}","branches_url":"https://api.github.com/repos/GolosChain/golos/branches{/branch}","tags_url":"https://api.github.com/repos/GolosChain/golos/tags","blobs_url":"https://api.github.com/repos/GolosChain/golos/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GolosChain/golos/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GolosChain/golos/git/refs{/sha}","trees_url":"https://api.github.com/repos/GolosChain/golos/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GolosChain/golos/statuses/{sha}","languages_url":"https://api.github.com/repos/GolosChain/golos/languages","stargazers_url":"https://api.github.com/repos/GolosChain/golos/stargazers","contributors_url":"https://api.github.com/repos/GolosChain/golos/contributors","subscribers_url":"https://api.github.com/repos/GolosChain/golos/subscribers","subscription_url":"https://api.github.com/repos/GolosChain/golos/subscription","commits_url":"https://api.github.com/repos/GolosChain/golos/commits{/sha}","git_commits_url":"https://api.github.com/repos/GolosChain/golos/git/commits{/sha}","comments_url":"https://api.github.com/repos/GolosChain/golos/comments{/number}","issue_comment_url":"https://api.github.com/repos/GolosChain/golos/issues/comments{/number}","contents_url":"https://api.github.com/repos/GolosChain/golos/contents/{+path}","compare_url":"https://api.github.com/repos/GolosChain/golos/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GolosChain/golos/merges","archive_url":"https://api.github.com/repos/GolosChain/golos/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GolosChain/golos/downloads","issues_url":"https://api.github.com/repos/GolosChain/golos/issues{/number}","pulls_url":"https://api.github.com/repos/GolosChain/golos/pulls{/number}","milestones_url":"https://api.github.com/repos/GolosChain/golos/milestones{/number}","notifications_url":"https://api.github.com/repos/GolosChain/golos/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GolosChain/golos/labels{/name}","releases_url":"https://api.github.com/repos/GolosChain/golos/releases{/id}","deployments_url":"https://api.github.com/repos/GolosChain/golos/deployments","created_at":"2016-08-04T14:29:58Z","updated_at":"2018-06-27T09:54:45Z","pushed_at":"2018-06-29T10:03:11Z","git_url":"git://github.com/GolosChain/golos.git","ssh_url":"git@github.com:GolosChain/golos.git","clone_url":"https://github.com/GolosChain/golos.git","svn_url":"https://github.com/GolosChain/golos","homepage":"https://developers.golos.io","size":20093,"stargazers_count":65,"watchers_count":65,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":43,"mirror_url":null,"archived":false,"open_issues_count":156,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":43,"open_issues":156,"watchers":65,"default_branch":"master"}},"base":{"label":"GolosChain:golos-v0.18.1","ref":"golos-v0.18.1","sha":"07a31ed0c1d41c73238575f70aa4ce1090f1704b","user":{"login":"GolosChain","id":20841297,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwODQxMjk3","avatar_url":"https://avatars0.githubusercontent.com/u/20841297?v=4","gravatar_id":"","url":"https://api.github.com/users/GolosChain","html_url":"https://github.com/GolosChain","followers_url":"https://api.github.com/users/GolosChain/followers","following_url":"https://api.github.com/users/GolosChain/following{/other_user}","gists_url":"https://api.github.com/users/GolosChain/gists{/gist_id}","starred_url":"https://api.github.com/users/GolosChain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GolosChain/subscriptions","organizations_url":"https://api.github.com/users/GolosChain/orgs","repos_url":"https://api.github.com/users/GolosChain/repos","events_url":"https://api.github.com/users/GolosChain/events{/privacy}","received_events_url":"https://api.github.com/users/GolosChain/received_events","type":"Organization","site_admin":false},"repo":{"id":64941501,"node_id":"MDEwOlJlcG9zaXRvcnk2NDk0MTUwMQ==","name":"golos","full_name":"GolosChain/golos","owner":{"login":"GolosChain","id":20841297,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwODQxMjk3","avatar_url":"https://avatars0.githubusercontent.com/u/20841297?v=4","gravatar_id":"","url":"https://api.github.com/users/GolosChain","html_url":"https://github.com/GolosChain","followers_url":"https://api.github.com/users/GolosChain/followers","following_url":"https://api.github.com/users/GolosChain/following{/other_user}","gists_url":"https://api.github.com/users/GolosChain/gists{/gist_id}","starred_url":"https://api.github.com/users/GolosChain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GolosChain/subscriptions","organizations_url":"https://api.github.com/users/GolosChain/orgs","repos_url":"https://api.github.com/users/GolosChain/repos","events_url":"https://api.github.com/users/GolosChain/events{/privacy}","received_events_url":"https://api.github.com/users/GolosChain/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GolosChain/golos","description":"Socio-economic mediablockchain","fork":true,"url":"https://api.github.com/repos/GolosChain/golos","forks_url":"https://api.github.com/repos/GolosChain/golos/forks","keys_url":"https://api.github.com/repos/GolosChain/golos/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GolosChain/golos/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GolosChain/golos/teams","hooks_url":"https://api.github.com/repos/GolosChain/golos/hooks","issue_events_url":"https://api.github.com/repos/GolosChain/golos/issues/events{/number}","events_url":"https://api.github.com/repos/GolosChain/golos/events","assignees_url":"https://api.github.com/repos/GolosChain/golos/assignees{/user}","branches_url":"https://api.github.com/repos/GolosChain/golos/branches{/branch}","tags_url":"https://api.github.com/repos/GolosChain/golos/tags","blobs_url":"https://api.github.com/repos/GolosChain/golos/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GolosChain/golos/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GolosChain/golos/git/refs{/sha}","trees_url":"https://api.github.com/repos/GolosChain/golos/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GolosChain/golos/statuses/{sha}","languages_url":"https://api.github.com/repos/GolosChain/golos/languages","stargazers_url":"https://api.github.com/repos/GolosChain/golos/stargazers","contributors_url":"https://api.github.com/repos/GolosChain/golos/contributors","subscribers_url":"https://api.github.com/repos/GolosChain/golos/subscribers","subscription_url":"https://api.github.com/repos/GolosChain/golos/subscription","commits_url":"https://api.github.com/repos/GolosChain/golos/commits{/sha}","git_commits_url":"https://api.github.com/repos/GolosChain/golos/git/commits{/sha}","comments_url":"https://api.github.com/repos/GolosChain/golos/comments{/number}","issue_comment_url":"https://api.github.com/repos/GolosChain/golos/issues/comments{/number}","contents_url":"https://api.github.com/repos/GolosChain/golos/contents/{+path}","compare_url":"https://api.github.com/repos/GolosChain/golos/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GolosChain/golos/merges","archive_url":"https://api.github.com/repos/GolosChain/golos/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GolosChain/golos/downloads","issues_url":"https://api.github.com/repos/GolosChain/golos/issues{/number}","pulls_url":"https://api.github.com/repos/GolosChain/golos/pulls{/number}","milestones_url":"https://api.github.com/repos/GolosChain/golos/milestones{/number}","notifications_url":"https://api.github.com/repos/GolosChain/golos/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GolosChain/golos/labels{/name}","releases_url":"https://api.github.com/repos/GolosChain/golos/releases{/id}","deployments_url":"https://api.github.com/repos/GolosChain/golos/deployments","created_at":"2016-08-04T14:29:58Z","updated_at":"2018-06-27T09:54:45Z","pushed_at":"2018-06-29T10:03:11Z","git_url":"git://github.com/GolosChain/golos.git","ssh_url":"git@github.com:GolosChain/golos.git","clone_url":"https://github.com/GolosChain/golos.git","svn_url":"https://github.com/GolosChain/golos","homepage":"https://developers.golos.io","size":20093,"stargazers_count":65,"watchers_count":65,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":43,"mirror_url":null,"archived":false,"open_issues_count":156,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":43,"open_issues":156,"watchers":65,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GolosChain/golos/pulls/779"},"html":{"href":"https://github.com/GolosChain/golos/pull/779"},"issue":{"href":"https://api.github.com/repos/GolosChain/golos/issues/779"},"comments":{"href":"https://api.github.com/repos/GolosChain/golos/issues/779/comments"},"review_comments":{"href":"https://api.github.com/repos/GolosChain/golos/pulls/779/comments"},"review_comment":{"href":"https://api.github.com/repos/GolosChain/golos/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GolosChain/golos/pulls/779/commits"},"statuses":{"href":"https://api.github.com/repos/GolosChain/golos/statuses/2b58fca420b80ddff40179415fdc417147dd0373"}},"author_association":"NONE"}}
{"actor":{"display_login":"maslenitsa93"}}