{"action":"created","comment":{"url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/pulls/comments/215032596","pull_request_review_id":152210609,"id":215032596,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNTAzMjU5Ng==","diff_hunk":"@@ -215,8 +219,39 @@ def _test_rollbackchain(self):\n         self.nodes[0].rollbackchain(self.nodes[0].getblockcount() - 20)\n \n         # Reconsider the fork2. Blocks should now be fully reconnected on fork2.\n-        self.nodes[0].reconsiderblock(bestblockhash2)\n-        assert_equal(self.nodes[0].getbestblockhash(), bestblockhash2);\n+        self.nodes[0].reconsiderblock(bestblockhashfork2)\n+        assert_equal(self.nodes[0].getbestblockhash(), bestblockhashfork2);\n+\n+\n+        #### Start testing reconsidermostworkchain\n+        # Create an additional fork 3 which is the longest fork. Then make the shortest\n+        # fork2 the active chain.  Then do a reconsidermostworkchain which should make\n+        # fork3 the active chain, and disregarding fork1 which is longer than fork2 but\n+        # shorter than fork3.\n+        \n+        print (\"Test that reconsidermostworkchain() works\")\n+\n+        # rollback to before fork 1 and 2, and then mine another longer fork 3\n+        self.nodes[0].rollbackchain(self.nodes[0].getblockcount() - 120, True)\n+        fork3blocks = 140;\n+        self.nodes[0].generate(fork3blocks)\n+        bestblockhashfork3 = self.nodes[0].getbestblockhash() #save for later\n+\n+        # now rollback again and make the shortest fork2 the active chain\n+        self.nodes[0].rollbackchain(self.nodes[0].getblockcount() - fork3blocks, True)\n+        self.nodes[0].reconsiderblock(bestblockhashfork2)\n+\n+        # do a reconsidermostworkchain but without the override flag\n+        try:\n+            self.nodes[0].reconsidermostworkchain()\n+        except JSONRPCException as e:\n+            print (e.error['message'])","path":"qa/rpc-tests/blockchain.py","position":81,"original_position":81,"commit_id":"5f27588d7fd065ff1a1a9f5fc20407d4274a4a21","original_commit_id":"5f27588d7fd065ff1a1a9f5fc20407d4274a4a21","user":{"login":"gandrewstone","id":89979,"node_id":"MDQ6VXNlcjg5OTc5","avatar_url":"https://avatars3.githubusercontent.com/u/89979?v=4","gravatar_id":"","url":"https://api.github.com/users/gandrewstone","html_url":"https://github.com/gandrewstone","followers_url":"https://api.github.com/users/gandrewstone/followers","following_url":"https://api.github.com/users/gandrewstone/following{/other_user}","gists_url":"https://api.github.com/users/gandrewstone/gists{/gist_id}","starred_url":"https://api.github.com/users/gandrewstone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gandrewstone/subscriptions","organizations_url":"https://api.github.com/users/gandrewstone/orgs","repos_url":"https://api.github.com/users/gandrewstone/repos","events_url":"https://api.github.com/users/gandrewstone/events{/privacy}","received_events_url":"https://api.github.com/users/gandrewstone/received_events","type":"User","site_admin":false},"body":"remove print or use logging.info","created_at":"2018-09-04T19:06:06Z","updated_at":"2018-09-04T19:15:18Z","html_url":"https://github.com/BitcoinUnlimited/BitcoinUnlimited/pull/1291#discussion_r215032596","pull_request_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/pulls/1291","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/pulls/comments/215032596"},"html":{"href":"https://github.com/BitcoinUnlimited/BitcoinUnlimited/pull/1291#discussion_r215032596"},"pull_request":{"href":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/pulls/1291"}}},"pull_request":{"url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/pulls/1291","id":211930065,"node_id":"MDExOlB1bGxSZXF1ZXN0MjExOTMwMDY1","html_url":"https://github.com/BitcoinUnlimited/BitcoinUnlimited/pull/1291","diff_url":"https://github.com/BitcoinUnlimited/BitcoinUnlimited/pull/1291.diff","patch_url":"https://github.com/BitcoinUnlimited/BitcoinUnlimited/pull/1291.patch","issue_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/issues/1291","number":1291,"state":"open","locked":false,"title":"Add rpc feature: reconsidermostworkchain","user":{"login":"ptschip","id":12862928,"node_id":"MDQ6VXNlcjEyODYyOTI4","avatar_url":"https://avatars0.githubusercontent.com/u/12862928?v=4","gravatar_id":"","url":"https://api.github.com/users/ptschip","html_url":"https://github.com/ptschip","followers_url":"https://api.github.com/users/ptschip/followers","following_url":"https://api.github.com/users/ptschip/following{/other_user}","gists_url":"https://api.github.com/users/ptschip/gists{/gist_id}","starred_url":"https://api.github.com/users/ptschip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ptschip/subscriptions","organizations_url":"https://api.github.com/users/ptschip/orgs","repos_url":"https://api.github.com/users/ptschip/repos","events_url":"https://api.github.com/users/ptschip/events{/privacy}","received_events_url":"https://api.github.com/users/ptschip/received_events","type":"User","site_admin":false},"body":"This feature is intended to be used during fork testing but also\r\nfor node operators which have fogotten to upgrade their clients before\r\na fork.  Getting back on to the correct fork can be a problem if there\r\nhave been a few blocks mined on the old chain after the fork time. By\r\nrunning this command the chain will automatically rollback to the forkpoint\r\nand then join the most work chain.","created_at":"2018-08-30T01:22:27Z","updated_at":"2018-09-04T19:15:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f897becceff29a3d0f60f78f4897baf2cf260377","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/pulls/1291/commits","review_comments_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/pulls/1291/comments","review_comment_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/pulls/comments{/number}","comments_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/issues/1291/comments","statuses_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/statuses/5f27588d7fd065ff1a1a9f5fc20407d4274a4a21","head":{"label":"ptschip:dev_rmw_chain","ref":"dev_rmw_chain","sha":"5f27588d7fd065ff1a1a9f5fc20407d4274a4a21","user":{"login":"ptschip","id":12862928,"node_id":"MDQ6VXNlcjEyODYyOTI4","avatar_url":"https://avatars0.githubusercontent.com/u/12862928?v=4","gravatar_id":"","url":"https://api.github.com/users/ptschip","html_url":"https://github.com/ptschip","followers_url":"https://api.github.com/users/ptschip/followers","following_url":"https://api.github.com/users/ptschip/following{/other_user}","gists_url":"https://api.github.com/users/ptschip/gists{/gist_id}","starred_url":"https://api.github.com/users/ptschip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ptschip/subscriptions","organizations_url":"https://api.github.com/users/ptschip/orgs","repos_url":"https://api.github.com/users/ptschip/repos","events_url":"https://api.github.com/users/ptschip/events{/privacy}","received_events_url":"https://api.github.com/users/ptschip/received_events","type":"User","site_admin":false},"repo":{"id":131705434,"node_id":"MDEwOlJlcG9zaXRvcnkxMzE3MDU0MzQ=","name":"BitcoinUnlimited","full_name":"ptschip/BitcoinUnlimited","owner":{"login":"ptschip","id":12862928,"node_id":"MDQ6VXNlcjEyODYyOTI4","avatar_url":"https://avatars0.githubusercontent.com/u/12862928?v=4","gravatar_id":"","url":"https://api.github.com/users/ptschip","html_url":"https://github.com/ptschip","followers_url":"https://api.github.com/users/ptschip/followers","following_url":"https://api.github.com/users/ptschip/following{/other_user}","gists_url":"https://api.github.com/users/ptschip/gists{/gist_id}","starred_url":"https://api.github.com/users/ptschip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ptschip/subscriptions","organizations_url":"https://api.github.com/users/ptschip/orgs","repos_url":"https://api.github.com/users/ptschip/repos","events_url":"https://api.github.com/users/ptschip/events{/privacy}","received_events_url":"https://api.github.com/users/ptschip/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ptschip/BitcoinUnlimited","description":"Bitcoin Unlimited integration/staging tree","fork":true,"url":"https://api.github.com/repos/ptschip/BitcoinUnlimited","forks_url":"https://api.github.com/repos/ptschip/BitcoinUnlimited/forks","keys_url":"https://api.github.com/repos/ptschip/BitcoinUnlimited/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ptschip/BitcoinUnlimited/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ptschip/BitcoinUnlimited/teams","hooks_url":"https://api.github.com/repos/ptschip/BitcoinUnlimited/hooks","issue_events_url":"https://api.github.com/repos/ptschip/BitcoinUnlimited/issues/events{/number}","events_url":"https://api.github.com/repos/ptschip/BitcoinUnlimited/events","assignees_url":"https://api.github.com/repos/ptschip/BitcoinUnlimited/assignees{/user}","branches_url":"https://api.github.com/repos/ptschip/BitcoinUnlimited/branches{/branch}","tags_url":"https://api.github.com/repos/ptschip/BitcoinUnlimited/tags","blobs_url":"https://api.github.com/repos/ptschip/BitcoinUnlimited/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ptschip/BitcoinUnlimited/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ptschip/BitcoinUnlimited/git/refs{/sha}","trees_url":"https://api.github.com/repos/ptschip/BitcoinUnlimited/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ptschip/BitcoinUnlimited/statuses/{sha}","languages_url":"https://api.github.com/repos/ptschip/BitcoinUnlimited/languages","stargazers_url":"https://api.github.com/repos/ptschip/BitcoinUnlimited/stargazers","contributors_url":"https://api.github.com/repos/ptschip/BitcoinUnlimited/contributors","subscribers_url":"https://api.github.com/repos/ptschip/BitcoinUnlimited/subscribers","subscription_url":"https://api.github.com/repos/ptschip/BitcoinUnlimited/subscription","commits_url":"https://api.github.com/repos/ptschip/BitcoinUnlimited/commits{/sha}","git_commits_url":"https://api.github.com/repos/ptschip/BitcoinUnlimited/git/commits{/sha}","comments_url":"https://api.github.com/repos/ptschip/BitcoinUnlimited/comments{/number}","issue_comment_url":"https://api.github.com/repos/ptschip/BitcoinUnlimited/issues/comments{/number}","contents_url":"https://api.github.com/repos/ptschip/BitcoinUnlimited/contents/{+path}","compare_url":"https://api.github.com/repos/ptschip/BitcoinUnlimited/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ptschip/BitcoinUnlimited/merges","archive_url":"https://api.github.com/repos/ptschip/BitcoinUnlimited/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ptschip/BitcoinUnlimited/downloads","issues_url":"https://api.github.com/repos/ptschip/BitcoinUnlimited/issues{/number}","pulls_url":"https://api.github.com/repos/ptschip/BitcoinUnlimited/pulls{/number}","milestones_url":"https://api.github.com/repos/ptschip/BitcoinUnlimited/milestones{/number}","notifications_url":"https://api.github.com/repos/ptschip/BitcoinUnlimited/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ptschip/BitcoinUnlimited/labels{/name}","releases_url":"https://api.github.com/repos/ptschip/BitcoinUnlimited/releases{/id}","deployments_url":"https://api.github.com/repos/ptschip/BitcoinUnlimited/deployments","created_at":"2018-05-01T11:26:54Z","updated_at":"2018-05-01T11:27:01Z","pushed_at":"2018-09-04T16:15:09Z","git_url":"git://github.com/ptschip/BitcoinUnlimited.git","ssh_url":"git@github.com:ptschip/BitcoinUnlimited.git","clone_url":"https://github.com/ptschip/BitcoinUnlimited.git","svn_url":"https://github.com/ptschip/BitcoinUnlimited","homepage":"http://www.bitcoinunlimited.info/download.html","size":96150,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"BitcoinCash"}},"base":{"label":"BitcoinUnlimited:dev","ref":"dev","sha":"2385b047d3fe40dba11f342b44bf480b0a0f0d47","user":{"login":"BitcoinUnlimited","id":14125627,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MTI1NjI3","avatar_url":"https://avatars0.githubusercontent.com/u/14125627?v=4","gravatar_id":"","url":"https://api.github.com/users/BitcoinUnlimited","html_url":"https://github.com/BitcoinUnlimited","followers_url":"https://api.github.com/users/BitcoinUnlimited/followers","following_url":"https://api.github.com/users/BitcoinUnlimited/following{/other_user}","gists_url":"https://api.github.com/users/BitcoinUnlimited/gists{/gist_id}","starred_url":"https://api.github.com/users/BitcoinUnlimited/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BitcoinUnlimited/subscriptions","organizations_url":"https://api.github.com/users/BitcoinUnlimited/orgs","repos_url":"https://api.github.com/users/BitcoinUnlimited/repos","events_url":"https://api.github.com/users/BitcoinUnlimited/events{/privacy}","received_events_url":"https://api.github.com/users/BitcoinUnlimited/received_events","type":"Organization","site_admin":false},"repo":{"id":18613259,"node_id":"MDEwOlJlcG9zaXRvcnkxODYxMzI1OQ==","name":"BitcoinUnlimited","full_name":"BitcoinUnlimited/BitcoinUnlimited","owner":{"login":"BitcoinUnlimited","id":14125627,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MTI1NjI3","avatar_url":"https://avatars0.githubusercontent.com/u/14125627?v=4","gravatar_id":"","url":"https://api.github.com/users/BitcoinUnlimited","html_url":"https://github.com/BitcoinUnlimited","followers_url":"https://api.github.com/users/BitcoinUnlimited/followers","following_url":"https://api.github.com/users/BitcoinUnlimited/following{/other_user}","gists_url":"https://api.github.com/users/BitcoinUnlimited/gists{/gist_id}","starred_url":"https://api.github.com/users/BitcoinUnlimited/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BitcoinUnlimited/subscriptions","organizations_url":"https://api.github.com/users/BitcoinUnlimited/orgs","repos_url":"https://api.github.com/users/BitcoinUnlimited/repos","events_url":"https://api.github.com/users/BitcoinUnlimited/events{/privacy}","received_events_url":"https://api.github.com/users/BitcoinUnlimited/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/BitcoinUnlimited/BitcoinUnlimited","description":"Bitcoin Unlimited integration/staging tree","fork":false,"url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited","forks_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/forks","keys_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/teams","hooks_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/hooks","issue_events_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/issues/events{/number}","events_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/events","assignees_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/assignees{/user}","branches_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/branches{/branch}","tags_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/tags","blobs_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/git/refs{/sha}","trees_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/statuses/{sha}","languages_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/languages","stargazers_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/stargazers","contributors_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/contributors","subscribers_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/subscribers","subscription_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/subscription","commits_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/commits{/sha}","git_commits_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/git/commits{/sha}","comments_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/comments{/number}","issue_comment_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/issues/comments{/number}","contents_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/contents/{+path}","compare_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/merges","archive_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/downloads","issues_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/issues{/number}","pulls_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/pulls{/number}","milestones_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/milestones{/number}","notifications_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/labels{/name}","releases_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/releases{/id}","deployments_url":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/deployments","created_at":"2014-04-09T21:03:00Z","updated_at":"2018-09-04T05:27:27Z","pushed_at":"2018-09-04T18:23:11Z","git_url":"git://github.com/BitcoinUnlimited/BitcoinUnlimited.git","ssh_url":"git@github.com:BitcoinUnlimited/BitcoinUnlimited.git","clone_url":"https://github.com/BitcoinUnlimited/BitcoinUnlimited.git","svn_url":"https://github.com/BitcoinUnlimited/BitcoinUnlimited","homepage":"http://www.bitcoinunlimited.info/download.html","size":69239,"stargazers_count":366,"watchers_count":366,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":158,"mirror_url":null,"archived":false,"open_issues_count":72,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":158,"open_issues":72,"watchers":366,"default_branch":"release"}},"_links":{"self":{"href":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/pulls/1291"},"html":{"href":"https://github.com/BitcoinUnlimited/BitcoinUnlimited/pull/1291"},"issue":{"href":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/issues/1291"},"comments":{"href":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/issues/1291/comments"},"review_comments":{"href":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/pulls/1291/comments"},"review_comment":{"href":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/pulls/1291/commits"},"statuses":{"href":"https://api.github.com/repos/BitcoinUnlimited/BitcoinUnlimited/statuses/5f27588d7fd065ff1a1a9f5fc20407d4274a4a21"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"gandrewstone"}}