{"action":"created","comment":{"url":"https://api.github.com/repos/lightningnetwork/lnd/pulls/comments/138766352","pull_request_review_id":62606762,"id":138766352,"diff_hunk":"@@ -967,13 +968,15 @@ type LightningPayment struct {\n }\n \n // SendPayment attempts to send a payment as described within the passed\n-// LightningPayment. This function is blocking and will return either: when the\n+// LightningPayment. If maxFee is not nil, SendPayment will attempt to\n+// find a route that requires a fee of less than *maxFee satoshis.\n+// This function is blocking and will return either: when the\n // payment is successful, or all candidates routes have been attempted and\n // resulted in a failed payment. If the payment succeeds, then a non-nil Route\n // will be returned which describes the path the successful payment traversed\n // within the network to reach the destination. Additionally, the payment\n // preimage will also be returned.\n-func (r *ChannelRouter) SendPayment(payment *LightningPayment) ([32]byte, *Route, error) {\n+func (r *ChannelRouter) SendPayment(payment *LightningPayment, maxFee *lnwire.MilliSatoshi) ([32]byte, *Route, error) {","path":"routing/router.go","position":36,"original_position":36,"commit_id":"f5cb8d4782e32363e6c16ad271dc68fb96a9f1c2","original_commit_id":"f5cb8d4782e32363e6c16ad271dc68fb96a9f1c2","user":{"login":"djseeds","id":14855769,"avatar_url":"https://avatars0.githubusercontent.com/u/14855769?v=4","gravatar_id":"","url":"https://api.github.com/users/djseeds","html_url":"https://github.com/djseeds","followers_url":"https://api.github.com/users/djseeds/followers","following_url":"https://api.github.com/users/djseeds/following{/other_user}","gists_url":"https://api.github.com/users/djseeds/gists{/gist_id}","starred_url":"https://api.github.com/users/djseeds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djseeds/subscriptions","organizations_url":"https://api.github.com/users/djseeds/orgs","repos_url":"https://api.github.com/users/djseeds/repos","events_url":"https://api.github.com/users/djseeds/events{/privacy}","received_events_url":"https://api.github.com/users/djseeds/received_events","type":"User","site_admin":false},"body":"@jimpo I totally agree, I'll make those changes now","created_at":"2017-09-13T23:36:16Z","updated_at":"2017-09-13T23:36:16Z","html_url":"https://github.com/lightningnetwork/lnd/pull/320#discussion_r138766352","pull_request_url":"https://api.github.com/repos/lightningnetwork/lnd/pulls/320","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/lightningnetwork/lnd/pulls/comments/138766352"},"html":{"href":"https://github.com/lightningnetwork/lnd/pull/320#discussion_r138766352"},"pull_request":{"href":"https://api.github.com/repos/lightningnetwork/lnd/pulls/320"}},"in_reply_to_id":138233545},"pull_request":{"url":"https://api.github.com/repos/lightningnetwork/lnd/pulls/320","id":139799509,"html_url":"https://github.com/lightningnetwork/lnd/pull/320","diff_url":"https://github.com/lightningnetwork/lnd/pull/320.diff","patch_url":"https://github.com/lightningnetwork/lnd/pull/320.patch","issue_url":"https://api.github.com/repos/lightningnetwork/lnd/issues/320","number":320,"state":"open","locked":false,"title":"Fee cutoff","user":{"login":"djseeds","id":14855769,"avatar_url":"https://avatars0.githubusercontent.com/u/14855769?v=4","gravatar_id":"","url":"https://api.github.com/users/djseeds","html_url":"https://github.com/djseeds","followers_url":"https://api.github.com/users/djseeds/followers","following_url":"https://api.github.com/users/djseeds/following{/other_user}","gists_url":"https://api.github.com/users/djseeds/gists{/gist_id}","starred_url":"https://api.github.com/users/djseeds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djseeds/subscriptions","organizations_url":"https://api.github.com/users/djseeds/orgs","repos_url":"https://api.github.com/users/djseeds/repos","events_url":"https://api.github.com/users/djseeds/events{/privacy}","received_events_url":"https://api.github.com/users/djseeds/received_events","type":"User","site_admin":false},"body":"Initial PR for #278 \r\n\r\nLooking for feedback!\r\n\r\nAdd fee-based cut-off during route construction\r\n\r\nExtend SendRequest proto to allow users to specify one of: \r\n - Ratio based cut-off: \"I will pay at most x * amt to send payments\" \r\n - Absolute cut-off: \"I will pay at most amt to send payments\"\r\n - Absolute with constant: \"I will pay at most x satoshis in fees\"\r\n\r\nModify SendPayment to accept maxFee parameter: pointer to maximum amount of satoshis the user is willing to pay (or nil for don't care)  Modify newRoute function to abandon routes with fees greater than *maxFee","created_at":"2017-09-07T13:03:49Z","updated_at":"2017-09-13T23:36:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7cd77e65d3c86e0e17b860308376e3bdec389e7a","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/lightningnetwork/lnd/pulls/320/commits","review_comments_url":"https://api.github.com/repos/lightningnetwork/lnd/pulls/320/comments","review_comment_url":"https://api.github.com/repos/lightningnetwork/lnd/pulls/comments{/number}","comments_url":"https://api.github.com/repos/lightningnetwork/lnd/issues/320/comments","statuses_url":"https://api.github.com/repos/lightningnetwork/lnd/statuses/f5cb8d4782e32363e6c16ad271dc68fb96a9f1c2","head":{"label":"djseeds:fee-cutoff","ref":"fee-cutoff","sha":"f5cb8d4782e32363e6c16ad271dc68fb96a9f1c2","user":{"login":"djseeds","id":14855769,"avatar_url":"https://avatars0.githubusercontent.com/u/14855769?v=4","gravatar_id":"","url":"https://api.github.com/users/djseeds","html_url":"https://github.com/djseeds","followers_url":"https://api.github.com/users/djseeds/followers","following_url":"https://api.github.com/users/djseeds/following{/other_user}","gists_url":"https://api.github.com/users/djseeds/gists{/gist_id}","starred_url":"https://api.github.com/users/djseeds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djseeds/subscriptions","organizations_url":"https://api.github.com/users/djseeds/orgs","repos_url":"https://api.github.com/users/djseeds/repos","events_url":"https://api.github.com/users/djseeds/events{/privacy}","received_events_url":"https://api.github.com/users/djseeds/received_events","type":"User","site_admin":false},"repo":{"id":102735854,"name":"lnd","full_name":"djseeds/lnd","owner":{"login":"djseeds","id":14855769,"avatar_url":"https://avatars0.githubusercontent.com/u/14855769?v=4","gravatar_id":"","url":"https://api.github.com/users/djseeds","html_url":"https://github.com/djseeds","followers_url":"https://api.github.com/users/djseeds/followers","following_url":"https://api.github.com/users/djseeds/following{/other_user}","gists_url":"https://api.github.com/users/djseeds/gists{/gist_id}","starred_url":"https://api.github.com/users/djseeds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djseeds/subscriptions","organizations_url":"https://api.github.com/users/djseeds/orgs","repos_url":"https://api.github.com/users/djseeds/repos","events_url":"https://api.github.com/users/djseeds/events{/privacy}","received_events_url":"https://api.github.com/users/djseeds/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/djseeds/lnd","description":"Lightning Network Daemon ⚡️","fork":true,"url":"https://api.github.com/repos/djseeds/lnd","forks_url":"https://api.github.com/repos/djseeds/lnd/forks","keys_url":"https://api.github.com/repos/djseeds/lnd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/djseeds/lnd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/djseeds/lnd/teams","hooks_url":"https://api.github.com/repos/djseeds/lnd/hooks","issue_events_url":"https://api.github.com/repos/djseeds/lnd/issues/events{/number}","events_url":"https://api.github.com/repos/djseeds/lnd/events","assignees_url":"https://api.github.com/repos/djseeds/lnd/assignees{/user}","branches_url":"https://api.github.com/repos/djseeds/lnd/branches{/branch}","tags_url":"https://api.github.com/repos/djseeds/lnd/tags","blobs_url":"https://api.github.com/repos/djseeds/lnd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/djseeds/lnd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/djseeds/lnd/git/refs{/sha}","trees_url":"https://api.github.com/repos/djseeds/lnd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/djseeds/lnd/statuses/{sha}","languages_url":"https://api.github.com/repos/djseeds/lnd/languages","stargazers_url":"https://api.github.com/repos/djseeds/lnd/stargazers","contributors_url":"https://api.github.com/repos/djseeds/lnd/contributors","subscribers_url":"https://api.github.com/repos/djseeds/lnd/subscribers","subscription_url":"https://api.github.com/repos/djseeds/lnd/subscription","commits_url":"https://api.github.com/repos/djseeds/lnd/commits{/sha}","git_commits_url":"https://api.github.com/repos/djseeds/lnd/git/commits{/sha}","comments_url":"https://api.github.com/repos/djseeds/lnd/comments{/number}","issue_comment_url":"https://api.github.com/repos/djseeds/lnd/issues/comments{/number}","contents_url":"https://api.github.com/repos/djseeds/lnd/contents/{+path}","compare_url":"https://api.github.com/repos/djseeds/lnd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/djseeds/lnd/merges","archive_url":"https://api.github.com/repos/djseeds/lnd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/djseeds/lnd/downloads","issues_url":"https://api.github.com/repos/djseeds/lnd/issues{/number}","pulls_url":"https://api.github.com/repos/djseeds/lnd/pulls{/number}","milestones_url":"https://api.github.com/repos/djseeds/lnd/milestones{/number}","notifications_url":"https://api.github.com/repos/djseeds/lnd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/djseeds/lnd/labels{/name}","releases_url":"https://api.github.com/repos/djseeds/lnd/releases{/id}","deployments_url":"https://api.github.com/repos/djseeds/lnd/deployments","created_at":"2017-09-07T12:44:09Z","updated_at":"2017-09-07T12:44:12Z","pushed_at":"2017-09-08T02:17:30Z","git_url":"git://github.com/djseeds/lnd.git","ssh_url":"git@github.com:djseeds/lnd.git","clone_url":"https://github.com/djseeds/lnd.git","svn_url":"https://github.com/djseeds/lnd","homepage":"","size":6996,"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,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"lightningnetwork:master","ref":"master","sha":"fe0a7b6a092a8974bd996284ca9964dc60780f89","user":{"login":"lightningnetwork","id":13424735,"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,"name":"lnd","full_name":"lightningnetwork/lnd","owner":{"login":"lightningnetwork","id":13424735,"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":"2017-09-12T09:46:22Z","pushed_at":"2017-09-13T23:35:49Z","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":7032,"stargazers_count":633,"watchers_count":633,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":153,"mirror_url":null,"open_issues_count":86,"forks":153,"open_issues":86,"watchers":633,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/lightningnetwork/lnd/pulls/320"},"html":{"href":"https://github.com/lightningnetwork/lnd/pull/320"},"issue":{"href":"https://api.github.com/repos/lightningnetwork/lnd/issues/320"},"comments":{"href":"https://api.github.com/repos/lightningnetwork/lnd/issues/320/comments"},"review_comments":{"href":"https://api.github.com/repos/lightningnetwork/lnd/pulls/320/comments"},"review_comment":{"href":"https://api.github.com/repos/lightningnetwork/lnd/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/lightningnetwork/lnd/pulls/320/commits"},"statuses":{"href":"https://api.github.com/repos/lightningnetwork/lnd/statuses/f5cb8d4782e32363e6c16ad271dc68fb96a9f1c2"}},"author_association":"NONE"}}
{"actor":{"display_login":"djseeds"}}