{"action":"created","comment":{"url":"https://api.github.com/repos/ripple/rippled/pulls/comments/61941103","id":61941103,"diff_hunk":"@@ -39,25 +39,29 @@ class DirectStepI : public StepImp<IOUAmount, IOUAmount, DirectStepI>\n     AccountID src_;\n     AccountID dst_;\n     Currency currency_;\n-    // Transfer fees are never charged when sending directly to or from an\n-    // issuing account\n-    bool noTransferFee_;\n+\n+    // Charge transfer fees whan the prev step redeems\n+    Step const* const prevStep_ = nullptr;\n+\n     beast::Journal j_;\n \n     struct Cache\n     {\n         IOUAmount in;\n         IOUAmount srcToDst;\n         IOUAmount out;\n+        bool srcRedeems;\n \n         Cache () = default;","path":"src/ripple/app/paths/impl/DirectStep.cpp","position":20,"original_position":20,"commit_id":"13fb707042360f5ac66ec425895f3741c538500b","original_commit_id":"54c77835ec208fdd7e5530b56c8b7a9e5bca6be7","user":{"login":"scottschurr","id":7840379,"avatar_url":"https://avatars.githubusercontent.com/u/7840379?v=3","gravatar_id":"","url":"https://api.github.com/users/scottschurr","html_url":"https://github.com/scottschurr","followers_url":"https://api.github.com/users/scottschurr/followers","following_url":"https://api.github.com/users/scottschurr/following{/other_user}","gists_url":"https://api.github.com/users/scottschurr/gists{/gist_id}","starred_url":"https://api.github.com/users/scottschurr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scottschurr/subscriptions","organizations_url":"https://api.github.com/users/scottschurr/orgs","repos_url":"https://api.github.com/users/scottschurr/repos","events_url":"https://api.github.com/users/scottschurr/events{/privacy}","received_events_url":"https://api.github.com/users/scottschurr/received_events","type":"User","site_admin":false},"body":"Do you really need a default constructor?  If I change this line to `Cache () = delete;` everything builds fine.  The prospect of a bunch of uninitialized values makes me nervous.","created_at":"2016-05-03T19:31:01Z","updated_at":"2016-05-03T19:31:01Z","html_url":"https://github.com/ripple/rippled/pull/1684#discussion_r61941103","pull_request_url":"https://api.github.com/repos/ripple/rippled/pulls/1684","_links":{"self":{"href":"https://api.github.com/repos/ripple/rippled/pulls/comments/61941103"},"html":{"href":"https://github.com/ripple/rippled/pull/1684#discussion_r61941103"},"pull_request":{"href":"https://api.github.com/repos/ripple/rippled/pulls/1684"}}},"pull_request":{"url":"https://api.github.com/repos/ripple/rippled/pulls/1684","id":68720213,"html_url":"https://github.com/ripple/rippled/pull/1684","diff_url":"https://github.com/ripple/rippled/pull/1684.diff","patch_url":"https://github.com/ripple/rippled/pull/1684.patch","issue_url":"https://api.github.com/repos/ripple/rippled/issues/1684","number":1684,"state":"open","locked":false,"title":"Transfer fees","user":{"login":"seelabs","id":5853458,"avatar_url":"https://avatars.githubusercontent.com/u/5853458?v=3","gravatar_id":"","url":"https://api.github.com/users/seelabs","html_url":"https://github.com/seelabs","followers_url":"https://api.github.com/users/seelabs/followers","following_url":"https://api.github.com/users/seelabs/following{/other_user}","gists_url":"https://api.github.com/users/seelabs/gists{/gist_id}","starred_url":"https://api.github.com/users/seelabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seelabs/subscriptions","organizations_url":"https://api.github.com/users/seelabs/orgs","repos_url":"https://api.github.com/users/seelabs/repos","events_url":"https://api.github.com/users/seelabs/events{/privacy}","received_events_url":"https://api.github.com/users/seelabs/received_events","type":"User","site_admin":false},"body":"There are three major changes in this PR:\r\n\r\n1) Transfer fees are only changed when transferring an IOU (an account redeems to a gateway and that gateway issues). Flow V2 was charging the transfer fee whenever an account issued, even when no IOU was transfered.\r\n\r\n2) In an offer book, the offer owner pays the transfer fee, not the payment sender.\r\n\r\n3) A strands output in the forward pass is limited by the amount requested in the reverse pass. Please review this commit carefully, as it mixes amounts from both the forward and reverse pass.\r\n\r\n@scottschurr @nbougalis ","created_at":"2016-05-03T15:01:56Z","updated_at":"2016-05-03T19:31:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5a0663edb6e24113498c2d6c712e9b5b4889488f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ripple/rippled/pulls/1684/commits","review_comments_url":"https://api.github.com/repos/ripple/rippled/pulls/1684/comments","review_comment_url":"https://api.github.com/repos/ripple/rippled/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ripple/rippled/issues/1684/comments","statuses_url":"https://api.github.com/repos/ripple/rippled/statuses/13fb707042360f5ac66ec425895f3741c538500b","head":{"label":"seelabs:transfer-fees","ref":"transfer-fees","sha":"13fb707042360f5ac66ec425895f3741c538500b","user":{"login":"seelabs","id":5853458,"avatar_url":"https://avatars.githubusercontent.com/u/5853458?v=3","gravatar_id":"","url":"https://api.github.com/users/seelabs","html_url":"https://github.com/seelabs","followers_url":"https://api.github.com/users/seelabs/followers","following_url":"https://api.github.com/users/seelabs/following{/other_user}","gists_url":"https://api.github.com/users/seelabs/gists{/gist_id}","starred_url":"https://api.github.com/users/seelabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seelabs/subscriptions","organizations_url":"https://api.github.com/users/seelabs/orgs","repos_url":"https://api.github.com/users/seelabs/repos","events_url":"https://api.github.com/users/seelabs/events{/privacy}","received_events_url":"https://api.github.com/users/seelabs/received_events","type":"User","site_admin":false},"repo":{"id":28865026,"name":"rippled","full_name":"seelabs/rippled","owner":{"login":"seelabs","id":5853458,"avatar_url":"https://avatars.githubusercontent.com/u/5853458?v=3","gravatar_id":"","url":"https://api.github.com/users/seelabs","html_url":"https://github.com/seelabs","followers_url":"https://api.github.com/users/seelabs/followers","following_url":"https://api.github.com/users/seelabs/following{/other_user}","gists_url":"https://api.github.com/users/seelabs/gists{/gist_id}","starred_url":"https://api.github.com/users/seelabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seelabs/subscriptions","organizations_url":"https://api.github.com/users/seelabs/orgs","repos_url":"https://api.github.com/users/seelabs/repos","events_url":"https://api.github.com/users/seelabs/events{/privacy}","received_events_url":"https://api.github.com/users/seelabs/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/seelabs/rippled","description":"Ripple peer-to-peer network daemon","fork":true,"url":"https://api.github.com/repos/seelabs/rippled","forks_url":"https://api.github.com/repos/seelabs/rippled/forks","keys_url":"https://api.github.com/repos/seelabs/rippled/keys{/key_id}","collaborators_url":"https://api.github.com/repos/seelabs/rippled/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/seelabs/rippled/teams","hooks_url":"https://api.github.com/repos/seelabs/rippled/hooks","issue_events_url":"https://api.github.com/repos/seelabs/rippled/issues/events{/number}","events_url":"https://api.github.com/repos/seelabs/rippled/events","assignees_url":"https://api.github.com/repos/seelabs/rippled/assignees{/user}","branches_url":"https://api.github.com/repos/seelabs/rippled/branches{/branch}","tags_url":"https://api.github.com/repos/seelabs/rippled/tags","blobs_url":"https://api.github.com/repos/seelabs/rippled/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/seelabs/rippled/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/seelabs/rippled/git/refs{/sha}","trees_url":"https://api.github.com/repos/seelabs/rippled/git/trees{/sha}","statuses_url":"https://api.github.com/repos/seelabs/rippled/statuses/{sha}","languages_url":"https://api.github.com/repos/seelabs/rippled/languages","stargazers_url":"https://api.github.com/repos/seelabs/rippled/stargazers","contributors_url":"https://api.github.com/repos/seelabs/rippled/contributors","subscribers_url":"https://api.github.com/repos/seelabs/rippled/subscribers","subscription_url":"https://api.github.com/repos/seelabs/rippled/subscription","commits_url":"https://api.github.com/repos/seelabs/rippled/commits{/sha}","git_commits_url":"https://api.github.com/repos/seelabs/rippled/git/commits{/sha}","comments_url":"https://api.github.com/repos/seelabs/rippled/comments{/number}","issue_comment_url":"https://api.github.com/repos/seelabs/rippled/issues/comments{/number}","contents_url":"https://api.github.com/repos/seelabs/rippled/contents/{+path}","compare_url":"https://api.github.com/repos/seelabs/rippled/compare/{base}...{head}","merges_url":"https://api.github.com/repos/seelabs/rippled/merges","archive_url":"https://api.github.com/repos/seelabs/rippled/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/seelabs/rippled/downloads","issues_url":"https://api.github.com/repos/seelabs/rippled/issues{/number}","pulls_url":"https://api.github.com/repos/seelabs/rippled/pulls{/number}","milestones_url":"https://api.github.com/repos/seelabs/rippled/milestones{/number}","notifications_url":"https://api.github.com/repos/seelabs/rippled/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/seelabs/rippled/labels{/name}","releases_url":"https://api.github.com/repos/seelabs/rippled/releases{/id}","deployments_url":"https://api.github.com/repos/seelabs/rippled/deployments","created_at":"2015-01-06T13:36:16Z","updated_at":"2016-01-13T15:43:53Z","pushed_at":"2016-05-03T14:43:32Z","git_url":"git://github.com/seelabs/rippled.git","ssh_url":"git@github.com:seelabs/rippled.git","clone_url":"https://github.com/seelabs/rippled.git","svn_url":"https://github.com/seelabs/rippled","homepage":"https://ripple.com","size":61856,"stargazers_count":0,"watchers_count":0,"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":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-03T18:59:29Z","pushed_at":"2016-05-03T19:11:02Z","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":111958,"stargazers_count":1089,"watchers_count":1089,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":329,"mirror_url":null,"open_issues_count":127,"forks":329,"open_issues":127,"watchers":1089,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/ripple/rippled/pulls/1684"},"html":{"href":"https://github.com/ripple/rippled/pull/1684"},"issue":{"href":"https://api.github.com/repos/ripple/rippled/issues/1684"},"comments":{"href":"https://api.github.com/repos/ripple/rippled/issues/1684/comments"},"review_comments":{"href":"https://api.github.com/repos/ripple/rippled/pulls/1684/comments"},"review_comment":{"href":"https://api.github.com/repos/ripple/rippled/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ripple/rippled/pulls/1684/commits"},"statuses":{"href":"https://api.github.com/repos/ripple/rippled/statuses/13fb707042360f5ac66ec425895f3741c538500b"}}}}