{"action":"created","comment":{"url":"https://api.github.com/repos/lightningnetwork/lnd/pulls/comments/195336090","pull_request_review_id":128682421,"id":195336090,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NTMzNjA5MA==","diff_hunk":"@@ -93,6 +95,15 @@ type Hop struct {\n \tFee lnwire.MilliSatoshi\n }\n \n+// edgePolicyWithSource is a helper struct to keep track of the source node\n+// of a channel edge. ChannelEdgePolicy only contains to destination node\n+// of the edge.\n+type edgePolicyWithSource struct {\n+\t// sourceNode","path":"routing/pathfind.go","position":41,"original_position":41,"commit_id":"dd62df4cca15fe73bbf39cca1d2158240e4a3f4b","original_commit_id":"8c778894d612b830b8a7cadd33f8308a645cdcbe","user":{"login":"joostjager","id":4638168,"node_id":"MDQ6VXNlcjQ2MzgxNjg=","avatar_url":"https://avatars2.githubusercontent.com/u/4638168?v=4","gravatar_id":"","url":"https://api.github.com/users/joostjager","html_url":"https://github.com/joostjager","followers_url":"https://api.github.com/users/joostjager/followers","following_url":"https://api.github.com/users/joostjager/following{/other_user}","gists_url":"https://api.github.com/users/joostjager/gists{/gist_id}","starred_url":"https://api.github.com/users/joostjager/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joostjager/subscriptions","organizations_url":"https://api.github.com/users/joostjager/orgs","repos_url":"https://api.github.com/users/joostjager/repos","events_url":"https://api.github.com/users/joostjager/events{/privacy}","received_events_url":"https://api.github.com/users/joostjager/received_events","type":"User","site_admin":false},"body":"Removed godoc for property. Not much to explain about this, other than the explanation that I write above about the type.","created_at":"2018-06-14T08:16:16Z","updated_at":"2018-06-14T08:16:17Z","html_url":"https://github.com/lightningnetwork/lnd/pull/1321#discussion_r195336090","pull_request_url":"https://api.github.com/repos/lightningnetwork/lnd/pulls/1321","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/lightningnetwork/lnd/pulls/comments/195336090"},"html":{"href":"https://github.com/lightningnetwork/lnd/pull/1321#discussion_r195336090"},"pull_request":{"href":"https://api.github.com/repos/lightningnetwork/lnd/pulls/1321"}},"in_reply_to_id":195015116},"pull_request":{"url":"https://api.github.com/repos/lightningnetwork/lnd/pulls/1321","id":192529216,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkyNTI5MjE2","html_url":"https://github.com/lightningnetwork/lnd/pull/1321","diff_url":"https://github.com/lightningnetwork/lnd/pull/1321.diff","patch_url":"https://github.com/lightningnetwork/lnd/pull/1321.patch","issue_url":"https://api.github.com/repos/lightningnetwork/lnd/issues/1321","number":1321,"state":"open","locked":false,"title":"routing: use correct fees by searching backwards","user":{"login":"joostjager","id":4638168,"node_id":"MDQ6VXNlcjQ2MzgxNjg=","avatar_url":"https://avatars2.githubusercontent.com/u/4638168?v=4","gravatar_id":"","url":"https://api.github.com/users/joostjager","html_url":"https://github.com/joostjager","followers_url":"https://api.github.com/users/joostjager/followers","following_url":"https://api.github.com/users/joostjager/following{/other_user}","gists_url":"https://api.github.com/users/joostjager/gists{/gist_id}","starred_url":"https://api.github.com/users/joostjager/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joostjager/subscriptions","organizations_url":"https://api.github.com/users/joostjager/orgs","repos_url":"https://api.github.com/users/joostjager/repos","events_url":"https://api.github.com/users/joostjager/events{/privacy}","received_events_url":"https://api.github.com/users/joostjager/received_events","type":"User","site_admin":false},"body":"The original findPath implementation can come up with a path that is rejected in newRoute because of \"channel graph has insufficient capacity\". The reason is that findPath calculates with the same amt all the way, while newRoute takes into account that amt needs to increase with every hop (looking from target back to source).\r\n\r\nThis change makes findPath use the correct fees and eliminates the possibility that newRoute returns the insufficient capacity error.\r\n\r\nIn this PR:\r\n- Refactor of the path finding unit test to be able add more cases without code duplication (table driven).\r\n- Unit test for invalid \"channel graph has insufficient capacity\" result\r\n- Reworked search algorithm to already take into account increasing amounts that need to be send to next hops","created_at":"2018-06-04T21:09:27Z","updated_at":"2018-06-14T08:16:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ea1bcba10f4f9d117086a15a0e2e0fa53a90683a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/lightningnetwork/lnd/pulls/1321/commits","review_comments_url":"https://api.github.com/repos/lightningnetwork/lnd/pulls/1321/comments","review_comment_url":"https://api.github.com/repos/lightningnetwork/lnd/pulls/comments{/number}","comments_url":"https://api.github.com/repos/lightningnetwork/lnd/issues/1321/comments","statuses_url":"https://api.github.com/repos/lightningnetwork/lnd/statuses/dd62df4cca15fe73bbf39cca1d2158240e4a3f4b","head":{"label":"joostjager:routing","ref":"routing","sha":"dd62df4cca15fe73bbf39cca1d2158240e4a3f4b","user":{"login":"joostjager","id":4638168,"node_id":"MDQ6VXNlcjQ2MzgxNjg=","avatar_url":"https://avatars2.githubusercontent.com/u/4638168?v=4","gravatar_id":"","url":"https://api.github.com/users/joostjager","html_url":"https://github.com/joostjager","followers_url":"https://api.github.com/users/joostjager/followers","following_url":"https://api.github.com/users/joostjager/following{/other_user}","gists_url":"https://api.github.com/users/joostjager/gists{/gist_id}","starred_url":"https://api.github.com/users/joostjager/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joostjager/subscriptions","organizations_url":"https://api.github.com/users/joostjager/orgs","repos_url":"https://api.github.com/users/joostjager/repos","events_url":"https://api.github.com/users/joostjager/events{/privacy}","received_events_url":"https://api.github.com/users/joostjager/received_events","type":"User","site_admin":false},"repo":{"id":133927509,"node_id":"MDEwOlJlcG9zaXRvcnkxMzM5Mjc1MDk=","name":"lnd","full_name":"joostjager/lnd","owner":{"login":"joostjager","id":4638168,"node_id":"MDQ6VXNlcjQ2MzgxNjg=","avatar_url":"https://avatars2.githubusercontent.com/u/4638168?v=4","gravatar_id":"","url":"https://api.github.com/users/joostjager","html_url":"https://github.com/joostjager","followers_url":"https://api.github.com/users/joostjager/followers","following_url":"https://api.github.com/users/joostjager/following{/other_user}","gists_url":"https://api.github.com/users/joostjager/gists{/gist_id}","starred_url":"https://api.github.com/users/joostjager/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joostjager/subscriptions","organizations_url":"https://api.github.com/users/joostjager/orgs","repos_url":"https://api.github.com/users/joostjager/repos","events_url":"https://api.github.com/users/joostjager/events{/privacy}","received_events_url":"https://api.github.com/users/joostjager/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/joostjager/lnd","description":"Lightning Network Daemon ⚡️","fork":true,"url":"https://api.github.com/repos/joostjager/lnd","forks_url":"https://api.github.com/repos/joostjager/lnd/forks","keys_url":"https://api.github.com/repos/joostjager/lnd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/joostjager/lnd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/joostjager/lnd/teams","hooks_url":"https://api.github.com/repos/joostjager/lnd/hooks","issue_events_url":"https://api.github.com/repos/joostjager/lnd/issues/events{/number}","events_url":"https://api.github.com/repos/joostjager/lnd/events","assignees_url":"https://api.github.com/repos/joostjager/lnd/assignees{/user}","branches_url":"https://api.github.com/repos/joostjager/lnd/branches{/branch}","tags_url":"https://api.github.com/repos/joostjager/lnd/tags","blobs_url":"https://api.github.com/repos/joostjager/lnd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/joostjager/lnd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/joostjager/lnd/git/refs{/sha}","trees_url":"https://api.github.com/repos/joostjager/lnd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/joostjager/lnd/statuses/{sha}","languages_url":"https://api.github.com/repos/joostjager/lnd/languages","stargazers_url":"https://api.github.com/repos/joostjager/lnd/stargazers","contributors_url":"https://api.github.com/repos/joostjager/lnd/contributors","subscribers_url":"https://api.github.com/repos/joostjager/lnd/subscribers","subscription_url":"https://api.github.com/repos/joostjager/lnd/subscription","commits_url":"https://api.github.com/repos/joostjager/lnd/commits{/sha}","git_commits_url":"https://api.github.com/repos/joostjager/lnd/git/commits{/sha}","comments_url":"https://api.github.com/repos/joostjager/lnd/comments{/number}","issue_comment_url":"https://api.github.com/repos/joostjager/lnd/issues/comments{/number}","contents_url":"https://api.github.com/repos/joostjager/lnd/contents/{+path}","compare_url":"https://api.github.com/repos/joostjager/lnd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/joostjager/lnd/merges","archive_url":"https://api.github.com/repos/joostjager/lnd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/joostjager/lnd/downloads","issues_url":"https://api.github.com/repos/joostjager/lnd/issues{/number}","pulls_url":"https://api.github.com/repos/joostjager/lnd/pulls{/number}","milestones_url":"https://api.github.com/repos/joostjager/lnd/milestones{/number}","notifications_url":"https://api.github.com/repos/joostjager/lnd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/joostjager/lnd/labels{/name}","releases_url":"https://api.github.com/repos/joostjager/lnd/releases{/id}","deployments_url":"https://api.github.com/repos/joostjager/lnd/deployments","created_at":"2018-05-18T08:40:36Z","updated_at":"2018-05-18T08:40:39Z","pushed_at":"2018-06-14T07:58:45Z","git_url":"git://github.com/joostjager/lnd.git","ssh_url":"git@github.com:joostjager/lnd.git","clone_url":"https://github.com/joostjager/lnd.git","svn_url":"https://github.com/joostjager/lnd","homepage":"","size":16413,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"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":"master"}},"base":{"label":"lightningnetwork:master","ref":"master","sha":"b5a228808b0446d6758a23e24d6c686aab9936fc","user":{"login":"lightningnetwork","id":13424735,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNDI0NzM1","avatar_url":"https://avatars0.githubusercontent.com/u/13424735?v=4","gravatar_id":"","url":"https://api.github.com/users/lightningnetwork","html_url":"https://github.com/lightningnetwork","followers_url":"https://api.github.com/users/lightningnetwork/followers","following_url":"https://api.github.com/users/lightningnetwork/following{/other_user}","gists_url":"https://api.github.com/users/lightningnetwork/gists{/gist_id}","starred_url":"https://api.github.com/users/lightningnetwork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lightningnetwork/subscriptions","organizations_url":"https://api.github.com/users/lightningnetwork/orgs","repos_url":"https://api.github.com/users/lightningnetwork/repos","events_url":"https://api.github.com/users/lightningnetwork/events{/privacy}","received_events_url":"https://api.github.com/users/lightningnetwork/received_events","type":"Organization","site_admin":false},"repo":{"id":49765480,"node_id":"MDEwOlJlcG9zaXRvcnk0OTc2NTQ4MA==","name":"lnd","full_name":"lightningnetwork/lnd","owner":{"login":"lightningnetwork","id":13424735,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNDI0NzM1","avatar_url":"https://avatars0.githubusercontent.com/u/13424735?v=4","gravatar_id":"","url":"https://api.github.com/users/lightningnetwork","html_url":"https://github.com/lightningnetwork","followers_url":"https://api.github.com/users/lightningnetwork/followers","following_url":"https://api.github.com/users/lightningnetwork/following{/other_user}","gists_url":"https://api.github.com/users/lightningnetwork/gists{/gist_id}","starred_url":"https://api.github.com/users/lightningnetwork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lightningnetwork/subscriptions","organizations_url":"https://api.github.com/users/lightningnetwork/orgs","repos_url":"https://api.github.com/users/lightningnetwork/repos","events_url":"https://api.github.com/users/lightningnetwork/events{/privacy}","received_events_url":"https://api.github.com/users/lightningnetwork/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/lightningnetwork/lnd","description":"Lightning Network Daemon ⚡️","fork":false,"url":"https://api.github.com/repos/lightningnetwork/lnd","forks_url":"https://api.github.com/repos/lightningnetwork/lnd/forks","keys_url":"https://api.github.com/repos/lightningnetwork/lnd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lightningnetwork/lnd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lightningnetwork/lnd/teams","hooks_url":"https://api.github.com/repos/lightningnetwork/lnd/hooks","issue_events_url":"https://api.github.com/repos/lightningnetwork/lnd/issues/events{/number}","events_url":"https://api.github.com/repos/lightningnetwork/lnd/events","assignees_url":"https://api.github.com/repos/lightningnetwork/lnd/assignees{/user}","branches_url":"https://api.github.com/repos/lightningnetwork/lnd/branches{/branch}","tags_url":"https://api.github.com/repos/lightningnetwork/lnd/tags","blobs_url":"https://api.github.com/repos/lightningnetwork/lnd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lightningnetwork/lnd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lightningnetwork/lnd/git/refs{/sha}","trees_url":"https://api.github.com/repos/lightningnetwork/lnd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lightningnetwork/lnd/statuses/{sha}","languages_url":"https://api.github.com/repos/lightningnetwork/lnd/languages","stargazers_url":"https://api.github.com/repos/lightningnetwork/lnd/stargazers","contributors_url":"https://api.github.com/repos/lightningnetwork/lnd/contributors","subscribers_url":"https://api.github.com/repos/lightningnetwork/lnd/subscribers","subscription_url":"https://api.github.com/repos/lightningnetwork/lnd/subscription","commits_url":"https://api.github.com/repos/lightningnetwork/lnd/commits{/sha}","git_commits_url":"https://api.github.com/repos/lightningnetwork/lnd/git/commits{/sha}","comments_url":"https://api.github.com/repos/lightningnetwork/lnd/comments{/number}","issue_comment_url":"https://api.github.com/repos/lightningnetwork/lnd/issues/comments{/number}","contents_url":"https://api.github.com/repos/lightningnetwork/lnd/contents/{+path}","compare_url":"https://api.github.com/repos/lightningnetwork/lnd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lightningnetwork/lnd/merges","archive_url":"https://api.github.com/repos/lightningnetwork/lnd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lightningnetwork/lnd/downloads","issues_url":"https://api.github.com/repos/lightningnetwork/lnd/issues{/number}","pulls_url":"https://api.github.com/repos/lightningnetwork/lnd/pulls{/number}","milestones_url":"https://api.github.com/repos/lightningnetwork/lnd/milestones{/number}","notifications_url":"https://api.github.com/repos/lightningnetwork/lnd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lightningnetwork/lnd/labels{/name}","releases_url":"https://api.github.com/repos/lightningnetwork/lnd/releases{/id}","deployments_url":"https://api.github.com/repos/lightningnetwork/lnd/deployments","created_at":"2016-01-16T08:19:33Z","updated_at":"2018-06-14T08:14:48Z","pushed_at":"2018-06-14T07:58:47Z","git_url":"git://github.com/lightningnetwork/lnd.git","ssh_url":"git@github.com:lightningnetwork/lnd.git","clone_url":"https://github.com/lightningnetwork/lnd.git","svn_url":"https://github.com/lightningnetwork/lnd","homepage":"","size":16249,"stargazers_count":2655,"watchers_count":2655,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":623,"mirror_url":null,"archived":false,"open_issues_count":178,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":623,"open_issues":178,"watchers":2655,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/lightningnetwork/lnd/pulls/1321"},"html":{"href":"https://github.com/lightningnetwork/lnd/pull/1321"},"issue":{"href":"https://api.github.com/repos/lightningnetwork/lnd/issues/1321"},"comments":{"href":"https://api.github.com/repos/lightningnetwork/lnd/issues/1321/comments"},"review_comments":{"href":"https://api.github.com/repos/lightningnetwork/lnd/pulls/1321/comments"},"review_comment":{"href":"https://api.github.com/repos/lightningnetwork/lnd/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/lightningnetwork/lnd/pulls/1321/commits"},"statuses":{"href":"https://api.github.com/repos/lightningnetwork/lnd/statuses/dd62df4cca15fe73bbf39cca1d2158240e4a3f4b"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"joostjager"}}