{"action":"created","comment":{"url":"https://api.github.com/repos/ripple/rippled/pulls/comments/61919233","id":61919233,"diff_hunk":"@@ -424,7 +452,11 @@ inline\n SHAMap::const_iterator&\n SHAMap::const_iterator::operator++()\n {\n-    item_ = map_->peekNextItem(item_->key(), stack_);\n+    auto temp = map_->peekNextItem(item_->key(), stack_);\n+    if (temp)\n+        item_ = temp->peekItem().get();\n+    else\n+        item_ = nullptr;","path":"src/ripple/shamap/SHAMap.h","position":115,"original_position":115,"commit_id":"f4d77fff42d1f83b35474966b17203621762ba03","original_commit_id":"f4d77fff42d1f83b35474966b17203621762ba03","user":{"login":"HowardHinnant","id":6708789,"avatar_url":"https://avatars.githubusercontent.com/u/6708789?v=3","gravatar_id":"","url":"https://api.github.com/users/HowardHinnant","html_url":"https://github.com/HowardHinnant","followers_url":"https://api.github.com/users/HowardHinnant/followers","following_url":"https://api.github.com/users/HowardHinnant/following{/other_user}","gists_url":"https://api.github.com/users/HowardHinnant/gists{/gist_id}","starred_url":"https://api.github.com/users/HowardHinnant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HowardHinnant/subscriptions","organizations_url":"https://api.github.com/users/HowardHinnant/orgs","repos_url":"https://api.github.com/users/HowardHinnant/repos","events_url":"https://api.github.com/users/HowardHinnant/events{/privacy}","received_events_url":"https://api.github.com/users/HowardHinnant/received_events","type":"User","site_admin":false},"body":"Yes.  I've thought about making them bidirectional.  It is technically very doable.  But we haven't had a motivating use case yet, and I don't want to add code we don't need.","created_at":"2016-05-03T17:17:19Z","updated_at":"2016-05-03T17:17:19Z","html_url":"https://github.com/ripple/rippled/pull/1647#discussion_r61919233","pull_request_url":"https://api.github.com/repos/ripple/rippled/pulls/1647","_links":{"self":{"href":"https://api.github.com/repos/ripple/rippled/pulls/comments/61919233"},"html":{"href":"https://github.com/ripple/rippled/pull/1647#discussion_r61919233"},"pull_request":{"href":"https://api.github.com/repos/ripple/rippled/pulls/1647"}}},"pull_request":{"url":"https://api.github.com/repos/ripple/rippled/pulls/1647","id":66923885,"html_url":"https://github.com/ripple/rippled/pull/1647","diff_url":"https://github.com/ripple/rippled/pull/1647.diff","patch_url":"https://github.com/ripple/rippled/pull/1647.patch","issue_url":"https://api.github.com/repos/ripple/rippled/issues/1647","number":1647,"state":"open","locked":false,"title":"Install SHAMapInnerNodeV2","user":{"login":"HowardHinnant","id":6708789,"avatar_url":"https://avatars.githubusercontent.com/u/6708789?v=3","gravatar_id":"","url":"https://api.github.com/users/HowardHinnant","html_url":"https://github.com/HowardHinnant","followers_url":"https://api.github.com/users/HowardHinnant/followers","following_url":"https://api.github.com/users/HowardHinnant/following{/other_user}","gists_url":"https://api.github.com/users/HowardHinnant/gists{/gist_id}","starred_url":"https://api.github.com/users/HowardHinnant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HowardHinnant/subscriptions","organizations_url":"https://api.github.com/users/HowardHinnant/orgs","repos_url":"https://api.github.com/users/HowardHinnant/repos","events_url":"https://api.github.com/users/HowardHinnant/events{/privacy}","received_events_url":"https://api.github.com/users/HowardHinnant/received_events","type":"User","site_admin":false},"body":"* Inner node optimization.\r\n\r\n@JoelKatz @vinniefalco \r\n\r\nI've squashed it all down because the individual commits weren't neatly organized into testable bits.  So the sum of the changes is probably clearer than the individual commits.  That being said, if either of you would rather review the individual commits version of this, that version still exists.\r\n\r\nI've put the switch-over ledger at 40,000,000 which is very far in the future.  That is easily changeable of course.  Here is the switch:\r\n\r\nhttps://github.com/ripple/rippled/commit/dc23185ab3955aef86d2550daaec6d576d3d1183#diff-c71c719ae07d12ad17a81571fcea7f26R984\r\n\r\nAlso, here is David's deployment checklist:\r\n\r\nhttps://ripplelabs.atlassian.net/wiki/pages/viewpage.action?spaceKey=RIPD&title=SHAMap+V2+Deployment","created_at":"2016-04-18T21:19:24Z","updated_at":"2016-05-03T17:17:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d175d811c2ac77a6a1dbcc69024ce4d01a341105","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ripple/rippled/pulls/1647/commits","review_comments_url":"https://api.github.com/repos/ripple/rippled/pulls/1647/comments","review_comment_url":"https://api.github.com/repos/ripple/rippled/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ripple/rippled/issues/1647/comments","statuses_url":"https://api.github.com/repos/ripple/rippled/statuses/f4d77fff42d1f83b35474966b17203621762ba03","head":{"label":"HowardHinnant:shamap2","ref":"shamap2","sha":"f4d77fff42d1f83b35474966b17203621762ba03","user":{"login":"HowardHinnant","id":6708789,"avatar_url":"https://avatars.githubusercontent.com/u/6708789?v=3","gravatar_id":"","url":"https://api.github.com/users/HowardHinnant","html_url":"https://github.com/HowardHinnant","followers_url":"https://api.github.com/users/HowardHinnant/followers","following_url":"https://api.github.com/users/HowardHinnant/following{/other_user}","gists_url":"https://api.github.com/users/HowardHinnant/gists{/gist_id}","starred_url":"https://api.github.com/users/HowardHinnant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HowardHinnant/subscriptions","organizations_url":"https://api.github.com/users/HowardHinnant/orgs","repos_url":"https://api.github.com/users/HowardHinnant/repos","events_url":"https://api.github.com/users/HowardHinnant/events{/privacy}","received_events_url":"https://api.github.com/users/HowardHinnant/received_events","type":"User","site_admin":false},"repo":{"id":16925449,"name":"rippled","full_name":"HowardHinnant/rippled","owner":{"login":"HowardHinnant","id":6708789,"avatar_url":"https://avatars.githubusercontent.com/u/6708789?v=3","gravatar_id":"","url":"https://api.github.com/users/HowardHinnant","html_url":"https://github.com/HowardHinnant","followers_url":"https://api.github.com/users/HowardHinnant/followers","following_url":"https://api.github.com/users/HowardHinnant/following{/other_user}","gists_url":"https://api.github.com/users/HowardHinnant/gists{/gist_id}","starred_url":"https://api.github.com/users/HowardHinnant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HowardHinnant/subscriptions","organizations_url":"https://api.github.com/users/HowardHinnant/orgs","repos_url":"https://api.github.com/users/HowardHinnant/repos","events_url":"https://api.github.com/users/HowardHinnant/events{/privacy}","received_events_url":"https://api.github.com/users/HowardHinnant/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/HowardHinnant/rippled","description":"Ripple peer-to-peer network daemon","fork":true,"url":"https://api.github.com/repos/HowardHinnant/rippled","forks_url":"https://api.github.com/repos/HowardHinnant/rippled/forks","keys_url":"https://api.github.com/repos/HowardHinnant/rippled/keys{/key_id}","collaborators_url":"https://api.github.com/repos/HowardHinnant/rippled/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/HowardHinnant/rippled/teams","hooks_url":"https://api.github.com/repos/HowardHinnant/rippled/hooks","issue_events_url":"https://api.github.com/repos/HowardHinnant/rippled/issues/events{/number}","events_url":"https://api.github.com/repos/HowardHinnant/rippled/events","assignees_url":"https://api.github.com/repos/HowardHinnant/rippled/assignees{/user}","branches_url":"https://api.github.com/repos/HowardHinnant/rippled/branches{/branch}","tags_url":"https://api.github.com/repos/HowardHinnant/rippled/tags","blobs_url":"https://api.github.com/repos/HowardHinnant/rippled/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/HowardHinnant/rippled/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/HowardHinnant/rippled/git/refs{/sha}","trees_url":"https://api.github.com/repos/HowardHinnant/rippled/git/trees{/sha}","statuses_url":"https://api.github.com/repos/HowardHinnant/rippled/statuses/{sha}","languages_url":"https://api.github.com/repos/HowardHinnant/rippled/languages","stargazers_url":"https://api.github.com/repos/HowardHinnant/rippled/stargazers","contributors_url":"https://api.github.com/repos/HowardHinnant/rippled/contributors","subscribers_url":"https://api.github.com/repos/HowardHinnant/rippled/subscribers","subscription_url":"https://api.github.com/repos/HowardHinnant/rippled/subscription","commits_url":"https://api.github.com/repos/HowardHinnant/rippled/commits{/sha}","git_commits_url":"https://api.github.com/repos/HowardHinnant/rippled/git/commits{/sha}","comments_url":"https://api.github.com/repos/HowardHinnant/rippled/comments{/number}","issue_comment_url":"https://api.github.com/repos/HowardHinnant/rippled/issues/comments{/number}","contents_url":"https://api.github.com/repos/HowardHinnant/rippled/contents/{+path}","compare_url":"https://api.github.com/repos/HowardHinnant/rippled/compare/{base}...{head}","merges_url":"https://api.github.com/repos/HowardHinnant/rippled/merges","archive_url":"https://api.github.com/repos/HowardHinnant/rippled/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/HowardHinnant/rippled/downloads","issues_url":"https://api.github.com/repos/HowardHinnant/rippled/issues{/number}","pulls_url":"https://api.github.com/repos/HowardHinnant/rippled/pulls{/number}","milestones_url":"https://api.github.com/repos/HowardHinnant/rippled/milestones{/number}","notifications_url":"https://api.github.com/repos/HowardHinnant/rippled/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/HowardHinnant/rippled/labels{/name}","releases_url":"https://api.github.com/repos/HowardHinnant/rippled/releases{/id}","deployments_url":"https://api.github.com/repos/HowardHinnant/rippled/deployments","created_at":"2014-02-17T20:21:56Z","updated_at":"2015-04-07T16:53:12Z","pushed_at":"2016-04-29T15:51:46Z","git_url":"git://github.com/HowardHinnant/rippled.git","ssh_url":"git@github.com:HowardHinnant/rippled.git","clone_url":"https://github.com/HowardHinnant/rippled.git","svn_url":"https://github.com/HowardHinnant/rippled","homepage":"https://ripple.com","size":62072,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"ripple:develop","ref":"develop","sha":"073ccf270560a8a81d89a76d1c31f99686a16636","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}","deployments_url":"https://api.github.com/repos/ripple/rippled/deployments","created_at":"2011-11-07T04:40:15Z","updated_at":"2016-05-02T16:19:38Z","pushed_at":"2016-05-03T15:01:57Z","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":111793,"stargazers_count":1088,"watchers_count":1088,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":329,"mirror_url":null,"open_issues_count":128,"forks":329,"open_issues":128,"watchers":1088,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/ripple/rippled/pulls/1647"},"html":{"href":"https://github.com/ripple/rippled/pull/1647"},"issue":{"href":"https://api.github.com/repos/ripple/rippled/issues/1647"},"comments":{"href":"https://api.github.com/repos/ripple/rippled/issues/1647/comments"},"review_comments":{"href":"https://api.github.com/repos/ripple/rippled/pulls/1647/comments"},"review_comment":{"href":"https://api.github.com/repos/ripple/rippled/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ripple/rippled/pulls/1647/commits"},"statuses":{"href":"https://api.github.com/repos/ripple/rippled/statuses/f4d77fff42d1f83b35474966b17203621762ba03"}}}}