{"action":"created","comment":{"url":"https://api.github.com/repos/OmniLayer/omnicore/pulls/comments/39333445","id":39333445,"diff_hunk":"@@ -696,28 +694,24 @@ Value omni_getcrowdsale(const Array& params, bool fHelp)\n     if (sp.close_early) response.push_back(Pair(\"endedtime\", sp.timeclosed));\n     if (sp.close_early && !sp.max_tokens) response.push_back(Pair(\"closetx\", txidClosed));\n \n-    // TODO: sort by height?\n-\n-    // array of txids contributing to crowdsale here if needed\n     if (showVerbose) {\n-        Array participanttxs;\n-        std::map<uint256, std::vector<int64_t> >::const_iterator it;\n-        for (it = database.begin(); it != database.end(); it++) {\n+        int64_t amountRaised = 0;\n+        std::map<int64_t, Object> sortMap;\n+        for (std::map<uint256, std::vector<int64_t> >::const_iterator it = database.begin(); it != database.end(); it++) {\n             Object participanttx;\n-\n             std::string txid = it->first.GetHex();\n-            int64_t userTokens = it->second.at(2);\n-            int64_t issuerTokens = it->second.at(3);\n-            int64_t amountSent = it->second.at(0);\n-\n-            amountRaised += amountSent;\n+            amountRaised += it->second.at(0);\n             participanttx.push_back(Pair(\"txid\", txid));\n-            participanttx.push_back(Pair(\"amountsent\", FormatMP(sp.property_desired, amountSent)));\n-            participanttx.push_back(Pair(\"participanttokens\", FormatMP(propertyId, userTokens)));\n-            participanttx.push_back(Pair(\"issuertokens\", FormatMP(propertyId, issuerTokens)));\n-            participanttxs.push_back(participanttx);\n+            participanttx.push_back(Pair(\"amountsent\", FormatMP(sp.property_desired, (int64_t)it->second.at(0))));","path":"src/omnicore/rpc.cpp","position":44,"original_position":44,"commit_id":"9687081199db4f5adb27b7e38653bcf13db5f0ee","original_commit_id":"9687081199db4f5adb27b7e38653bcf13db5f0ee","user":{"login":"dexX7","id":5836089,"avatar_url":"https://avatars.githubusercontent.com/u/5836089?v=3","gravatar_id":"","url":"https://api.github.com/users/dexX7","html_url":"https://github.com/dexX7","followers_url":"https://api.github.com/users/dexX7/followers","following_url":"https://api.github.com/users/dexX7/following{/other_user}","gists_url":"https://api.github.com/users/dexX7/gists{/gist_id}","starred_url":"https://api.github.com/users/dexX7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dexX7/subscriptions","organizations_url":"https://api.github.com/users/dexX7/orgs","repos_url":"https://api.github.com/users/dexX7/repos","events_url":"https://api.github.com/users/dexX7/events{/privacy}","received_events_url":"https://api.github.com/users/dexX7/received_events","type":"User","site_admin":false},"body":"No need to cast `(int64_t)` for `it->second`, it's already `int64_t`.","created_at":"2015-09-12T03:36:24Z","updated_at":"2015-09-12T03:36:24Z","html_url":"https://github.com/OmniLayer/omnicore/pull/239#discussion_r39333445","pull_request_url":"https://api.github.com/repos/OmniLayer/omnicore/pulls/239","_links":{"self":{"href":"https://api.github.com/repos/OmniLayer/omnicore/pulls/comments/39333445"},"html":{"href":"https://github.com/OmniLayer/omnicore/pull/239#discussion_r39333445"},"pull_request":{"href":"https://api.github.com/repos/OmniLayer/omnicore/pulls/239"}}},"pull_request":{"url":"https://api.github.com/repos/OmniLayer/omnicore/pulls/239","id":44845853,"html_url":"https://github.com/OmniLayer/omnicore/pull/239","diff_url":"https://github.com/OmniLayer/omnicore/pull/239.diff","patch_url":"https://github.com/OmniLayer/omnicore/pull/239.patch","issue_url":"https://api.github.com/repos/OmniLayer/omnicore/issues/239","number":239,"state":"open","locked":false,"title":"Move omni_getcrowdsale amountraised field into verbose output and sort participants","user":{"login":"zathras-crypto","id":5633351,"avatar_url":"https://avatars.githubusercontent.com/u/5633351?v=3","gravatar_id":"","url":"https://api.github.com/users/zathras-crypto","html_url":"https://github.com/zathras-crypto","followers_url":"https://api.github.com/users/zathras-crypto/followers","following_url":"https://api.github.com/users/zathras-crypto/following{/other_user}","gists_url":"https://api.github.com/users/zathras-crypto/gists{/gist_id}","starred_url":"https://api.github.com/users/zathras-crypto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zathras-crypto/subscriptions","organizations_url":"https://api.github.com/users/zathras-crypto/orgs","repos_url":"https://api.github.com/users/zathras-crypto/repos","events_url":"https://api.github.com/users/zathras-crypto/events{/privacy}","received_events_url":"https://api.github.com/users/zathras-crypto/received_events","type":"User","site_admin":false},"body":"Note: we could leave amount raised in the non-verbose output, but that would mean calculating all participants when non-verbose which is a slow and expensive call.\r\n\r\n","created_at":"2015-09-12T03:22:20Z","updated_at":"2015-09-12T03:36:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ac87e671c42a41cbfb3dae54451ee708e0f96b20","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/OmniLayer/omnicore/pulls/239/commits","review_comments_url":"https://api.github.com/repos/OmniLayer/omnicore/pulls/239/comments","review_comment_url":"https://api.github.com/repos/OmniLayer/omnicore/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OmniLayer/omnicore/issues/239/comments","statuses_url":"https://api.github.com/repos/OmniLayer/omnicore/statuses/9687081199db4f5adb27b7e38653bcf13db5f0ee","head":{"label":"zathras-crypto:0.0.10-Z-FixCrowdSaleAmountRemaining","ref":"0.0.10-Z-FixCrowdSaleAmountRemaining","sha":"9687081199db4f5adb27b7e38653bcf13db5f0ee","user":{"login":"zathras-crypto","id":5633351,"avatar_url":"https://avatars.githubusercontent.com/u/5633351?v=3","gravatar_id":"","url":"https://api.github.com/users/zathras-crypto","html_url":"https://github.com/zathras-crypto","followers_url":"https://api.github.com/users/zathras-crypto/followers","following_url":"https://api.github.com/users/zathras-crypto/following{/other_user}","gists_url":"https://api.github.com/users/zathras-crypto/gists{/gist_id}","starred_url":"https://api.github.com/users/zathras-crypto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zathras-crypto/subscriptions","organizations_url":"https://api.github.com/users/zathras-crypto/orgs","repos_url":"https://api.github.com/users/zathras-crypto/repos","events_url":"https://api.github.com/users/zathras-crypto/events{/privacy}","received_events_url":"https://api.github.com/users/zathras-crypto/received_events","type":"User","site_admin":false},"repo":{"id":19960841,"name":"omnicore","full_name":"zathras-crypto/omnicore","owner":{"login":"zathras-crypto","id":5633351,"avatar_url":"https://avatars.githubusercontent.com/u/5633351?v=3","gravatar_id":"","url":"https://api.github.com/users/zathras-crypto","html_url":"https://github.com/zathras-crypto","followers_url":"https://api.github.com/users/zathras-crypto/followers","following_url":"https://api.github.com/users/zathras-crypto/following{/other_user}","gists_url":"https://api.github.com/users/zathras-crypto/gists{/gist_id}","starred_url":"https://api.github.com/users/zathras-crypto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zathras-crypto/subscriptions","organizations_url":"https://api.github.com/users/zathras-crypto/orgs","repos_url":"https://api.github.com/users/zathras-crypto/repos","events_url":"https://api.github.com/users/zathras-crypto/events{/privacy}","received_events_url":"https://api.github.com/users/zathras-crypto/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/zathras-crypto/omnicore","description":"mastercore info","fork":true,"url":"https://api.github.com/repos/zathras-crypto/omnicore","forks_url":"https://api.github.com/repos/zathras-crypto/omnicore/forks","keys_url":"https://api.github.com/repos/zathras-crypto/omnicore/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zathras-crypto/omnicore/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zathras-crypto/omnicore/teams","hooks_url":"https://api.github.com/repos/zathras-crypto/omnicore/hooks","issue_events_url":"https://api.github.com/repos/zathras-crypto/omnicore/issues/events{/number}","events_url":"https://api.github.com/repos/zathras-crypto/omnicore/events","assignees_url":"https://api.github.com/repos/zathras-crypto/omnicore/assignees{/user}","branches_url":"https://api.github.com/repos/zathras-crypto/omnicore/branches{/branch}","tags_url":"https://api.github.com/repos/zathras-crypto/omnicore/tags","blobs_url":"https://api.github.com/repos/zathras-crypto/omnicore/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zathras-crypto/omnicore/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zathras-crypto/omnicore/git/refs{/sha}","trees_url":"https://api.github.com/repos/zathras-crypto/omnicore/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zathras-crypto/omnicore/statuses/{sha}","languages_url":"https://api.github.com/repos/zathras-crypto/omnicore/languages","stargazers_url":"https://api.github.com/repos/zathras-crypto/omnicore/stargazers","contributors_url":"https://api.github.com/repos/zathras-crypto/omnicore/contributors","subscribers_url":"https://api.github.com/repos/zathras-crypto/omnicore/subscribers","subscription_url":"https://api.github.com/repos/zathras-crypto/omnicore/subscription","commits_url":"https://api.github.com/repos/zathras-crypto/omnicore/commits{/sha}","git_commits_url":"https://api.github.com/repos/zathras-crypto/omnicore/git/commits{/sha}","comments_url":"https://api.github.com/repos/zathras-crypto/omnicore/comments{/number}","issue_comment_url":"https://api.github.com/repos/zathras-crypto/omnicore/issues/comments{/number}","contents_url":"https://api.github.com/repos/zathras-crypto/omnicore/contents/{+path}","compare_url":"https://api.github.com/repos/zathras-crypto/omnicore/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zathras-crypto/omnicore/merges","archive_url":"https://api.github.com/repos/zathras-crypto/omnicore/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zathras-crypto/omnicore/downloads","issues_url":"https://api.github.com/repos/zathras-crypto/omnicore/issues{/number}","pulls_url":"https://api.github.com/repos/zathras-crypto/omnicore/pulls{/number}","milestones_url":"https://api.github.com/repos/zathras-crypto/omnicore/milestones{/number}","notifications_url":"https://api.github.com/repos/zathras-crypto/omnicore/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zathras-crypto/omnicore/labels{/name}","releases_url":"https://api.github.com/repos/zathras-crypto/omnicore/releases{/id}","created_at":"2014-05-19T23:15:09Z","updated_at":"2015-05-18T06:43:01Z","pushed_at":"2015-09-12T03:15:41Z","git_url":"git://github.com/zathras-crypto/omnicore.git","ssh_url":"git@github.com:zathras-crypto/omnicore.git","clone_url":"https://github.com/zathras-crypto/omnicore.git","svn_url":"https://github.com/zathras-crypto/omnicore","homepage":"mastercoin.org","size":55630,"stargazers_count":1,"watchers_count":1,"language":"TypeScript","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":8,"forks":0,"open_issues":8,"watchers":1,"default_branch":"0.0.8-Z-UIAlpha"}},"base":{"label":"OmniLayer:omnicore-0.0.10","ref":"omnicore-0.0.10","sha":"73c2b88e7b01038655c5850094288692ec02599d","user":{"login":"OmniLayer","id":10849356,"avatar_url":"https://avatars.githubusercontent.com/u/10849356?v=3","gravatar_id":"","url":"https://api.github.com/users/OmniLayer","html_url":"https://github.com/OmniLayer","followers_url":"https://api.github.com/users/OmniLayer/followers","following_url":"https://api.github.com/users/OmniLayer/following{/other_user}","gists_url":"https://api.github.com/users/OmniLayer/gists{/gist_id}","starred_url":"https://api.github.com/users/OmniLayer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OmniLayer/subscriptions","organizations_url":"https://api.github.com/users/OmniLayer/orgs","repos_url":"https://api.github.com/users/OmniLayer/repos","events_url":"https://api.github.com/users/OmniLayer/events{/privacy}","received_events_url":"https://api.github.com/users/OmniLayer/received_events","type":"Organization","site_admin":false},"repo":{"id":32829630,"name":"omnicore","full_name":"OmniLayer/omnicore","owner":{"login":"OmniLayer","id":10849356,"avatar_url":"https://avatars.githubusercontent.com/u/10849356?v=3","gravatar_id":"","url":"https://api.github.com/users/OmniLayer","html_url":"https://github.com/OmniLayer","followers_url":"https://api.github.com/users/OmniLayer/followers","following_url":"https://api.github.com/users/OmniLayer/following{/other_user}","gists_url":"https://api.github.com/users/OmniLayer/gists{/gist_id}","starred_url":"https://api.github.com/users/OmniLayer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OmniLayer/subscriptions","organizations_url":"https://api.github.com/users/OmniLayer/orgs","repos_url":"https://api.github.com/users/OmniLayer/repos","events_url":"https://api.github.com/users/OmniLayer/events{/privacy}","received_events_url":"https://api.github.com/users/OmniLayer/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OmniLayer/omnicore","description":"OmniCore staging tree","fork":true,"url":"https://api.github.com/repos/OmniLayer/omnicore","forks_url":"https://api.github.com/repos/OmniLayer/omnicore/forks","keys_url":"https://api.github.com/repos/OmniLayer/omnicore/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OmniLayer/omnicore/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OmniLayer/omnicore/teams","hooks_url":"https://api.github.com/repos/OmniLayer/omnicore/hooks","issue_events_url":"https://api.github.com/repos/OmniLayer/omnicore/issues/events{/number}","events_url":"https://api.github.com/repos/OmniLayer/omnicore/events","assignees_url":"https://api.github.com/repos/OmniLayer/omnicore/assignees{/user}","branches_url":"https://api.github.com/repos/OmniLayer/omnicore/branches{/branch}","tags_url":"https://api.github.com/repos/OmniLayer/omnicore/tags","blobs_url":"https://api.github.com/repos/OmniLayer/omnicore/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OmniLayer/omnicore/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OmniLayer/omnicore/git/refs{/sha}","trees_url":"https://api.github.com/repos/OmniLayer/omnicore/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OmniLayer/omnicore/statuses/{sha}","languages_url":"https://api.github.com/repos/OmniLayer/omnicore/languages","stargazers_url":"https://api.github.com/repos/OmniLayer/omnicore/stargazers","contributors_url":"https://api.github.com/repos/OmniLayer/omnicore/contributors","subscribers_url":"https://api.github.com/repos/OmniLayer/omnicore/subscribers","subscription_url":"https://api.github.com/repos/OmniLayer/omnicore/subscription","commits_url":"https://api.github.com/repos/OmniLayer/omnicore/commits{/sha}","git_commits_url":"https://api.github.com/repos/OmniLayer/omnicore/git/commits{/sha}","comments_url":"https://api.github.com/repos/OmniLayer/omnicore/comments{/number}","issue_comment_url":"https://api.github.com/repos/OmniLayer/omnicore/issues/comments{/number}","contents_url":"https://api.github.com/repos/OmniLayer/omnicore/contents/{+path}","compare_url":"https://api.github.com/repos/OmniLayer/omnicore/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OmniLayer/omnicore/merges","archive_url":"https://api.github.com/repos/OmniLayer/omnicore/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OmniLayer/omnicore/downloads","issues_url":"https://api.github.com/repos/OmniLayer/omnicore/issues{/number}","pulls_url":"https://api.github.com/repos/OmniLayer/omnicore/pulls{/number}","milestones_url":"https://api.github.com/repos/OmniLayer/omnicore/milestones{/number}","notifications_url":"https://api.github.com/repos/OmniLayer/omnicore/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OmniLayer/omnicore/labels{/name}","releases_url":"https://api.github.com/repos/OmniLayer/omnicore/releases{/id}","created_at":"2015-03-24T22:48:50Z","updated_at":"2015-09-01T01:45:29Z","pushed_at":"2015-09-12T03:22:20Z","git_url":"git://github.com/OmniLayer/omnicore.git","ssh_url":"git@github.com:OmniLayer/omnicore.git","clone_url":"https://github.com/OmniLayer/omnicore.git","svn_url":"https://github.com/OmniLayer/omnicore","homepage":"http://www.omnilayer.org/","size":46022,"stargazers_count":10,"watchers_count":10,"language":"C++","has_issues":true,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":47,"forks":1,"open_issues":47,"watchers":10,"default_branch":"omnicore-0.0.10"}},"_links":{"self":{"href":"https://api.github.com/repos/OmniLayer/omnicore/pulls/239"},"html":{"href":"https://github.com/OmniLayer/omnicore/pull/239"},"issue":{"href":"https://api.github.com/repos/OmniLayer/omnicore/issues/239"},"comments":{"href":"https://api.github.com/repos/OmniLayer/omnicore/issues/239/comments"},"review_comments":{"href":"https://api.github.com/repos/OmniLayer/omnicore/pulls/239/comments"},"review_comment":{"href":"https://api.github.com/repos/OmniLayer/omnicore/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OmniLayer/omnicore/pulls/239/commits"},"statuses":{"href":"https://api.github.com/repos/OmniLayer/omnicore/statuses/9687081199db4f5adb27b7e38653bcf13db5f0ee"}}}}