{"action":"created","comment":{"url":"https://api.github.com/repos/ripple/rippled/pulls/comments/33810208","id":33810208,"diff_hunk":"@@ -1399,25 +1399,43 @@ bool NetworkOPsImp::checkLastClosedLedger (\n }\n \n void NetworkOPsImp::switchLastClosedLedger (\n-    Ledger::pointer newLedger, bool duringConsensus)\n+    Ledger::pointer newLCL, bool duringConsensus)\n {\n-    // set the newledger as our last closed ledger -- this is abnormal code\n+    // set the newLCL as our last closed ledger -- this is abnormal code\n \n     auto msg = duringConsensus ? \"JUMPdc\" : \"JUMP\";\n-    m_journal.error << msg << \" last closed ledger to \" << newLedger->getHash ();\n+    m_journal.error << msg << \" last closed ledger to \" << newLCL->getHash ();\n \n     clearNeedNetworkLedger ();\n-    newLedger->setClosed ();\n-    auto openLedger = std::make_shared<Ledger> (false, std::ref (*newLedger));\n-    m_ledgerMaster.switchLedgers (newLedger, openLedger);\n+    newLCL->setClosed ();\n+    auto newOL = std::make_shared<Ledger> (false, std::ref (*newLCL));\n+    // Caller must own master lock","path":"src/ripple/app/misc/NetworkOPs.cpp","position":20,"original_position":20,"commit_id":"cf381770a70ca18df71976657bc7e1dd3cc5b443","original_commit_id":"da61d199892a4b9a773d271cb72cc550f2bc9b4c","user":{"login":"vinniefalco","id":1503976,"avatar_url":"https://avatars.githubusercontent.com/u/1503976?v=3","gravatar_id":"","url":"https://api.github.com/users/vinniefalco","html_url":"https://github.com/vinniefalco","followers_url":"https://api.github.com/users/vinniefalco/followers","following_url":"https://api.github.com/users/vinniefalco/following{/other_user}","gists_url":"https://api.github.com/users/vinniefalco/gists{/gist_id}","starred_url":"https://api.github.com/users/vinniefalco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vinniefalco/subscriptions","organizations_url":"https://api.github.com/users/vinniefalco/orgs","repos_url":"https://api.github.com/users/vinniefalco/repos","events_url":"https://api.github.com/users/vinniefalco/events{/privacy}","received_events_url":"https://api.github.com/users/vinniefalco/received_events","type":"User","site_admin":false},"body":"@rec Please audit the call chain and make sure that the master lock is held","created_at":"2015-07-02T18:50:13Z","updated_at":"2015-07-02T18:50:13Z","html_url":"https://github.com/ripple/rippled/pull/1163#discussion_r33810208","pull_request_url":"https://api.github.com/repos/ripple/rippled/pulls/1163","_links":{"self":{"href":"https://api.github.com/repos/ripple/rippled/pulls/comments/33810208"},"html":{"href":"https://github.com/ripple/rippled/pull/1163#discussion_r33810208"},"pull_request":{"href":"https://api.github.com/repos/ripple/rippled/pulls/1163"}}},"pull_request":{"url":"https://api.github.com/repos/ripple/rippled/pulls/1163","id":39111164,"html_url":"https://github.com/ripple/rippled/pull/1163","diff_url":"https://github.com/ripple/rippled/pull/1163.diff","patch_url":"https://github.com/ripple/rippled/pull/1163.patch","issue_url":"https://api.github.com/repos/ripple/rippled/issues/1163","number":1163,"state":"open","locked":false,"title":"Apply tx to new open ledger on switch (RIPD-972):","user":{"login":"vinniefalco","id":1503976,"avatar_url":"https://avatars.githubusercontent.com/u/1503976?v=3","gravatar_id":"","url":"https://api.github.com/users/vinniefalco","html_url":"https://github.com/vinniefalco","followers_url":"https://api.github.com/users/vinniefalco/followers","following_url":"https://api.github.com/users/vinniefalco/following{/other_user}","gists_url":"https://api.github.com/users/vinniefalco/gists{/gist_id}","starred_url":"https://api.github.com/users/vinniefalco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vinniefalco/subscriptions","organizations_url":"https://api.github.com/users/vinniefalco/orgs","repos_url":"https://api.github.com/users/vinniefalco/repos","events_url":"https://api.github.com/users/vinniefalco/events{/privacy}","received_events_url":"https://api.github.com/users/vinniefalco/received_events","type":"User","site_admin":false},"body":"Reimplemented and reopened.\r\n\r\nWhen the last closed ledger jumps, transactions from the old open ledger and local transactions need to be applied to the new open ledger or else transactions could get lost locally (but still relayed, and therefore make it into a ledger).\r\n\r\nA harmful effect is that rippled will report that the transaction was not applied even when it was, making robust transaction submission malfunction.","created_at":"2015-07-02T18:20:12Z","updated_at":"2015-07-02T18:50:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b21f2b59cbb127f157a61c33bb5d0d18e4cdd963","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ripple/rippled/pulls/1163/commits","review_comments_url":"https://api.github.com/repos/ripple/rippled/pulls/1163/comments","review_comment_url":"https://api.github.com/repos/ripple/rippled/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ripple/rippled/issues/1163/comments","statuses_url":"https://api.github.com/repos/ripple/rippled/statuses/cf381770a70ca18df71976657bc7e1dd3cc5b443","head":{"label":"vinniefalco:jump","ref":"jump","sha":"cf381770a70ca18df71976657bc7e1dd3cc5b443","user":{"login":"vinniefalco","id":1503976,"avatar_url":"https://avatars.githubusercontent.com/u/1503976?v=3","gravatar_id":"","url":"https://api.github.com/users/vinniefalco","html_url":"https://github.com/vinniefalco","followers_url":"https://api.github.com/users/vinniefalco/followers","following_url":"https://api.github.com/users/vinniefalco/following{/other_user}","gists_url":"https://api.github.com/users/vinniefalco/gists{/gist_id}","starred_url":"https://api.github.com/users/vinniefalco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vinniefalco/subscriptions","organizations_url":"https://api.github.com/users/vinniefalco/orgs","repos_url":"https://api.github.com/users/vinniefalco/repos","events_url":"https://api.github.com/users/vinniefalco/events{/privacy}","received_events_url":"https://api.github.com/users/vinniefalco/received_events","type":"User","site_admin":false},"repo":{"id":10961863,"name":"rippled","full_name":"vinniefalco/rippled","owner":{"login":"vinniefalco","id":1503976,"avatar_url":"https://avatars.githubusercontent.com/u/1503976?v=3","gravatar_id":"","url":"https://api.github.com/users/vinniefalco","html_url":"https://github.com/vinniefalco","followers_url":"https://api.github.com/users/vinniefalco/followers","following_url":"https://api.github.com/users/vinniefalco/following{/other_user}","gists_url":"https://api.github.com/users/vinniefalco/gists{/gist_id}","starred_url":"https://api.github.com/users/vinniefalco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vinniefalco/subscriptions","organizations_url":"https://api.github.com/users/vinniefalco/orgs","repos_url":"https://api.github.com/users/vinniefalco/repos","events_url":"https://api.github.com/users/vinniefalco/events{/privacy}","received_events_url":"https://api.github.com/users/vinniefalco/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vinniefalco/rippled","description":"Ripple peer-to-peer network daemon","fork":true,"url":"https://api.github.com/repos/vinniefalco/rippled","forks_url":"https://api.github.com/repos/vinniefalco/rippled/forks","keys_url":"https://api.github.com/repos/vinniefalco/rippled/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vinniefalco/rippled/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vinniefalco/rippled/teams","hooks_url":"https://api.github.com/repos/vinniefalco/rippled/hooks","issue_events_url":"https://api.github.com/repos/vinniefalco/rippled/issues/events{/number}","events_url":"https://api.github.com/repos/vinniefalco/rippled/events","assignees_url":"https://api.github.com/repos/vinniefalco/rippled/assignees{/user}","branches_url":"https://api.github.com/repos/vinniefalco/rippled/branches{/branch}","tags_url":"https://api.github.com/repos/vinniefalco/rippled/tags","blobs_url":"https://api.github.com/repos/vinniefalco/rippled/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vinniefalco/rippled/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vinniefalco/rippled/git/refs{/sha}","trees_url":"https://api.github.com/repos/vinniefalco/rippled/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vinniefalco/rippled/statuses/{sha}","languages_url":"https://api.github.com/repos/vinniefalco/rippled/languages","stargazers_url":"https://api.github.com/repos/vinniefalco/rippled/stargazers","contributors_url":"https://api.github.com/repos/vinniefalco/rippled/contributors","subscribers_url":"https://api.github.com/repos/vinniefalco/rippled/subscribers","subscription_url":"https://api.github.com/repos/vinniefalco/rippled/subscription","commits_url":"https://api.github.com/repos/vinniefalco/rippled/commits{/sha}","git_commits_url":"https://api.github.com/repos/vinniefalco/rippled/git/commits{/sha}","comments_url":"https://api.github.com/repos/vinniefalco/rippled/comments{/number}","issue_comment_url":"https://api.github.com/repos/vinniefalco/rippled/issues/comments{/number}","contents_url":"https://api.github.com/repos/vinniefalco/rippled/contents/{+path}","compare_url":"https://api.github.com/repos/vinniefalco/rippled/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vinniefalco/rippled/merges","archive_url":"https://api.github.com/repos/vinniefalco/rippled/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vinniefalco/rippled/downloads","issues_url":"https://api.github.com/repos/vinniefalco/rippled/issues{/number}","pulls_url":"https://api.github.com/repos/vinniefalco/rippled/pulls{/number}","milestones_url":"https://api.github.com/repos/vinniefalco/rippled/milestones{/number}","notifications_url":"https://api.github.com/repos/vinniefalco/rippled/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vinniefalco/rippled/labels{/name}","releases_url":"https://api.github.com/repos/vinniefalco/rippled/releases{/id}","created_at":"2013-06-26T07:51:04Z","updated_at":"2015-05-07T17:26:52Z","pushed_at":"2015-07-02T18:48:58Z","git_url":"git://github.com/vinniefalco/rippled.git","ssh_url":"git@github.com:vinniefalco/rippled.git","clone_url":"https://github.com/vinniefalco/rippled.git","svn_url":"https://github.com/vinniefalco/rippled","homepage":"https://ripple.com","size":70744,"stargazers_count":3,"watchers_count":3,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":3,"default_branch":"develop"}},"base":{"label":"ripple:develop","ref":"develop","sha":"72659d431e25e938b0036f5f2eae9ce36c8bb7cf","user":{"login":"ripple","id":3165523,"avatar_url":"https://avatars.githubusercontent.com/u/3165523?v=3","gravatar_id":"","url":"https://api.github.com/users/ripple","html_url":"https://github.com/ripple","followers_url":"https://api.github.com/users/ripple/followers","following_url":"https://api.github.com/users/ripple/following{/other_user}","gists_url":"https://api.github.com/users/ripple/gists{/gist_id}","starred_url":"https://api.github.com/users/ripple/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ripple/subscriptions","organizations_url":"https://api.github.com/users/ripple/orgs","repos_url":"https://api.github.com/users/ripple/repos","events_url":"https://api.github.com/users/ripple/events{/privacy}","received_events_url":"https://api.github.com/users/ripple/received_events","type":"Organization","site_admin":false},"repo":{"id":2724167,"name":"rippled","full_name":"ripple/rippled","owner":{"login":"ripple","id":3165523,"avatar_url":"https://avatars.githubusercontent.com/u/3165523?v=3","gravatar_id":"","url":"https://api.github.com/users/ripple","html_url":"https://github.com/ripple","followers_url":"https://api.github.com/users/ripple/followers","following_url":"https://api.github.com/users/ripple/following{/other_user}","gists_url":"https://api.github.com/users/ripple/gists{/gist_id}","starred_url":"https://api.github.com/users/ripple/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ripple/subscriptions","organizations_url":"https://api.github.com/users/ripple/orgs","repos_url":"https://api.github.com/users/ripple/repos","events_url":"https://api.github.com/users/ripple/events{/privacy}","received_events_url":"https://api.github.com/users/ripple/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ripple/rippled","description":"Ripple peer-to-peer network daemon","fork":false,"url":"https://api.github.com/repos/ripple/rippled","forks_url":"https://api.github.com/repos/ripple/rippled/forks","keys_url":"https://api.github.com/repos/ripple/rippled/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ripple/rippled/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ripple/rippled/teams","hooks_url":"https://api.github.com/repos/ripple/rippled/hooks","issue_events_url":"https://api.github.com/repos/ripple/rippled/issues/events{/number}","events_url":"https://api.github.com/repos/ripple/rippled/events","assignees_url":"https://api.github.com/repos/ripple/rippled/assignees{/user}","branches_url":"https://api.github.com/repos/ripple/rippled/branches{/branch}","tags_url":"https://api.github.com/repos/ripple/rippled/tags","blobs_url":"https://api.github.com/repos/ripple/rippled/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ripple/rippled/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ripple/rippled/git/refs{/sha}","trees_url":"https://api.github.com/repos/ripple/rippled/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ripple/rippled/statuses/{sha}","languages_url":"https://api.github.com/repos/ripple/rippled/languages","stargazers_url":"https://api.github.com/repos/ripple/rippled/stargazers","contributors_url":"https://api.github.com/repos/ripple/rippled/contributors","subscribers_url":"https://api.github.com/repos/ripple/rippled/subscribers","subscription_url":"https://api.github.com/repos/ripple/rippled/subscription","commits_url":"https://api.github.com/repos/ripple/rippled/commits{/sha}","git_commits_url":"https://api.github.com/repos/ripple/rippled/git/commits{/sha}","comments_url":"https://api.github.com/repos/ripple/rippled/comments{/number}","issue_comment_url":"https://api.github.com/repos/ripple/rippled/issues/comments{/number}","contents_url":"https://api.github.com/repos/ripple/rippled/contents/{+path}","compare_url":"https://api.github.com/repos/ripple/rippled/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ripple/rippled/merges","archive_url":"https://api.github.com/repos/ripple/rippled/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ripple/rippled/downloads","issues_url":"https://api.github.com/repos/ripple/rippled/issues{/number}","pulls_url":"https://api.github.com/repos/ripple/rippled/pulls{/number}","milestones_url":"https://api.github.com/repos/ripple/rippled/milestones{/number}","notifications_url":"https://api.github.com/repos/ripple/rippled/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ripple/rippled/labels{/name}","releases_url":"https://api.github.com/repos/ripple/rippled/releases{/id}","created_at":"2011-11-07T04:40:15Z","updated_at":"2015-06-27T22:07:51Z","pushed_at":"2015-07-02T18:48:59Z","git_url":"git://github.com/ripple/rippled.git","ssh_url":"git@github.com:ripple/rippled.git","clone_url":"https://github.com/ripple/rippled.git","svn_url":"https://github.com/ripple/rippled","homepage":"https://ripple.com","size":118614,"stargazers_count":965,"watchers_count":965,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":272,"mirror_url":null,"open_issues_count":131,"forks":272,"open_issues":131,"watchers":965,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/ripple/rippled/pulls/1163"},"html":{"href":"https://github.com/ripple/rippled/pull/1163"},"issue":{"href":"https://api.github.com/repos/ripple/rippled/issues/1163"},"comments":{"href":"https://api.github.com/repos/ripple/rippled/issues/1163/comments"},"review_comments":{"href":"https://api.github.com/repos/ripple/rippled/pulls/1163/comments"},"review_comment":{"href":"https://api.github.com/repos/ripple/rippled/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ripple/rippled/pulls/1163/commits"},"statuses":{"href":"https://api.github.com/repos/ripple/rippled/statuses/cf381770a70ca18df71976657bc7e1dd3cc5b443"}}}}