{"action":"created","comment":{"url":"https://api.github.com/repos/bitpay/bitcore/pulls/comments/30461247","id":30461247,"diff_hunk":"@@ -256,15 +257,36 @@ Transaction.prototype._missingChange = function() {\n   return !this._changeScript;\n };\n \n-Transaction.prototype._hasDustOutputs = function() {\n+Transaction.prototype._hasDustOutputs = function(opts) {\n+  if (opts.disableDustOutputs) {\n+    return;\n+  }\n   var index, output;\n   for (index in this.outputs) {\n     output = this.outputs[index];\n-    if (output.satoshis < Transaction.DUST_AMOUNT && !output.script.isDataOut()) {\n-      return true;\n+    if (output.satoshis < Transaction.DUST_AMOUNT &&","path":"lib/transaction/transaction.js","position":123,"original_position":123,"commit_id":"26bd5a864a135c280baf13eee143fadc3be5f83b","original_commit_id":"26bd5a864a135c280baf13eee143fadc3be5f83b","user":{"login":"braydonf","id":544777,"avatar_url":"https://avatars.githubusercontent.com/u/544777?v=3","gravatar_id":"","url":"https://api.github.com/users/braydonf","html_url":"https://github.com/braydonf","followers_url":"https://api.github.com/users/braydonf/followers","following_url":"https://api.github.com/users/braydonf/following{/other_user}","gists_url":"https://api.github.com/users/braydonf/gists{/gist_id}","starred_url":"https://api.github.com/users/braydonf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/braydonf/subscriptions","organizations_url":"https://api.github.com/users/braydonf/orgs","repos_url":"https://api.github.com/users/braydonf/repos","events_url":"https://api.github.com/users/braydonf/events{/privacy}","received_events_url":"https://api.github.com/users/braydonf/received_events","type":"User","site_admin":false},"body":"Similar, one line","created_at":"2015-05-16T13:48:57Z","updated_at":"2015-05-16T13:48:57Z","html_url":"https://github.com/bitpay/bitcore/pull/1226#discussion_r30461247","pull_request_url":"https://api.github.com/repos/bitpay/bitcore/pulls/1226","_links":{"self":{"href":"https://api.github.com/repos/bitpay/bitcore/pulls/comments/30461247"},"html":{"href":"https://github.com/bitpay/bitcore/pull/1226#discussion_r30461247"},"pull_request":{"href":"https://api.github.com/repos/bitpay/bitcore/pulls/1226"}}},"pull_request":{"url":"https://api.github.com/repos/bitpay/bitcore/pulls/1226","id":35277607,"html_url":"https://github.com/bitpay/bitcore/pull/1226","diff_url":"https://github.com/bitpay/bitcore/pull/1226.diff","patch_url":"https://github.com/bitpay/bitcore/pull/1226.patch","issue_url":"https://api.github.com/repos/bitpay/bitcore/issues/1226","number":1226,"state":"open","locked":false,"title":"Simplify transaction.getSerializationError()","user":{"login":"dskloet","id":6271274,"avatar_url":"https://avatars.githubusercontent.com/u/6271274?v=3","gravatar_id":"","url":"https://api.github.com/users/dskloet","html_url":"https://github.com/dskloet","followers_url":"https://api.github.com/users/dskloet/followers","following_url":"https://api.github.com/users/dskloet/following{/other_user}","gists_url":"https://api.github.com/users/dskloet/gists{/gist_id}","starred_url":"https://api.github.com/users/dskloet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dskloet/subscriptions","organizations_url":"https://api.github.com/users/dskloet/orgs","repos_url":"https://api.github.com/users/dskloet/repos","events_url":"https://api.github.com/users/dskloet/events{/privacy}","received_events_url":"https://api.github.com/users/dskloet/received_events","type":"User","site_admin":false},"body":"This takes care of some lint errors about number of statements and cyclomatic complexity.","created_at":"2015-05-12T22:29:14Z","updated_at":"2015-05-16T13:48:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f1f6b92752b035845d5d510700de88005e6f98a8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/bitpay/bitcore/pulls/1226/commits","review_comments_url":"https://api.github.com/repos/bitpay/bitcore/pulls/1226/comments","review_comment_url":"https://api.github.com/repos/bitpay/bitcore/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bitpay/bitcore/issues/1226/comments","statuses_url":"https://api.github.com/repos/bitpay/bitcore/statuses/26bd5a864a135c280baf13eee143fadc3be5f83b","head":{"label":"dskloet:refactor/get-serialization-error","ref":"refactor/get-serialization-error","sha":"26bd5a864a135c280baf13eee143fadc3be5f83b","user":{"login":"dskloet","id":6271274,"avatar_url":"https://avatars.githubusercontent.com/u/6271274?v=3","gravatar_id":"","url":"https://api.github.com/users/dskloet","html_url":"https://github.com/dskloet","followers_url":"https://api.github.com/users/dskloet/followers","following_url":"https://api.github.com/users/dskloet/following{/other_user}","gists_url":"https://api.github.com/users/dskloet/gists{/gist_id}","starred_url":"https://api.github.com/users/dskloet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dskloet/subscriptions","organizations_url":"https://api.github.com/users/dskloet/orgs","repos_url":"https://api.github.com/users/dskloet/repos","events_url":"https://api.github.com/users/dskloet/events{/privacy}","received_events_url":"https://api.github.com/users/dskloet/received_events","type":"User","site_admin":false},"repo":{"id":31135757,"name":"bitcore","full_name":"dskloet/bitcore","owner":{"login":"dskloet","id":6271274,"avatar_url":"https://avatars.githubusercontent.com/u/6271274?v=3","gravatar_id":"","url":"https://api.github.com/users/dskloet","html_url":"https://github.com/dskloet","followers_url":"https://api.github.com/users/dskloet/followers","following_url":"https://api.github.com/users/dskloet/following{/other_user}","gists_url":"https://api.github.com/users/dskloet/gists{/gist_id}","starred_url":"https://api.github.com/users/dskloet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dskloet/subscriptions","organizations_url":"https://api.github.com/users/dskloet/orgs","repos_url":"https://api.github.com/users/dskloet/repos","events_url":"https://api.github.com/users/dskloet/events{/privacy}","received_events_url":"https://api.github.com/users/dskloet/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dskloet/bitcore","description":"A pure and powerful JavaScript Bitcoin library","fork":true,"url":"https://api.github.com/repos/dskloet/bitcore","forks_url":"https://api.github.com/repos/dskloet/bitcore/forks","keys_url":"https://api.github.com/repos/dskloet/bitcore/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dskloet/bitcore/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dskloet/bitcore/teams","hooks_url":"https://api.github.com/repos/dskloet/bitcore/hooks","issue_events_url":"https://api.github.com/repos/dskloet/bitcore/issues/events{/number}","events_url":"https://api.github.com/repos/dskloet/bitcore/events","assignees_url":"https://api.github.com/repos/dskloet/bitcore/assignees{/user}","branches_url":"https://api.github.com/repos/dskloet/bitcore/branches{/branch}","tags_url":"https://api.github.com/repos/dskloet/bitcore/tags","blobs_url":"https://api.github.com/repos/dskloet/bitcore/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dskloet/bitcore/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dskloet/bitcore/git/refs{/sha}","trees_url":"https://api.github.com/repos/dskloet/bitcore/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dskloet/bitcore/statuses/{sha}","languages_url":"https://api.github.com/repos/dskloet/bitcore/languages","stargazers_url":"https://api.github.com/repos/dskloet/bitcore/stargazers","contributors_url":"https://api.github.com/repos/dskloet/bitcore/contributors","subscribers_url":"https://api.github.com/repos/dskloet/bitcore/subscribers","subscription_url":"https://api.github.com/repos/dskloet/bitcore/subscription","commits_url":"https://api.github.com/repos/dskloet/bitcore/commits{/sha}","git_commits_url":"https://api.github.com/repos/dskloet/bitcore/git/commits{/sha}","comments_url":"https://api.github.com/repos/dskloet/bitcore/comments{/number}","issue_comment_url":"https://api.github.com/repos/dskloet/bitcore/issues/comments{/number}","contents_url":"https://api.github.com/repos/dskloet/bitcore/contents/{+path}","compare_url":"https://api.github.com/repos/dskloet/bitcore/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dskloet/bitcore/merges","archive_url":"https://api.github.com/repos/dskloet/bitcore/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dskloet/bitcore/downloads","issues_url":"https://api.github.com/repos/dskloet/bitcore/issues{/number}","pulls_url":"https://api.github.com/repos/dskloet/bitcore/pulls{/number}","milestones_url":"https://api.github.com/repos/dskloet/bitcore/milestones{/number}","notifications_url":"https://api.github.com/repos/dskloet/bitcore/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dskloet/bitcore/labels{/name}","releases_url":"https://api.github.com/repos/dskloet/bitcore/releases{/id}","created_at":"2015-02-21T18:29:29Z","updated_at":"2015-04-06T20:23:29Z","pushed_at":"2015-05-13T18:52:15Z","git_url":"git://github.com/dskloet/bitcore.git","ssh_url":"git@github.com:dskloet/bitcore.git","clone_url":"https://github.com/dskloet/bitcore.git","svn_url":"https://github.com/dskloet/bitcore","homepage":"","size":10670,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"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":"bitpay:master","ref":"master","sha":"bb843ee6a5c96ce117b233c471f9a7cf78af4994","user":{"login":"bitpay","id":2554930,"avatar_url":"https://avatars.githubusercontent.com/u/2554930?v=3","gravatar_id":"","url":"https://api.github.com/users/bitpay","html_url":"https://github.com/bitpay","followers_url":"https://api.github.com/users/bitpay/followers","following_url":"https://api.github.com/users/bitpay/following{/other_user}","gists_url":"https://api.github.com/users/bitpay/gists{/gist_id}","starred_url":"https://api.github.com/users/bitpay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bitpay/subscriptions","organizations_url":"https://api.github.com/users/bitpay/orgs","repos_url":"https://api.github.com/users/bitpay/repos","events_url":"https://api.github.com/users/bitpay/events{/privacy}","received_events_url":"https://api.github.com/users/bitpay/received_events","type":"Organization","site_admin":false},"repo":{"id":15259244,"name":"bitcore","full_name":"bitpay/bitcore","owner":{"login":"bitpay","id":2554930,"avatar_url":"https://avatars.githubusercontent.com/u/2554930?v=3","gravatar_id":"","url":"https://api.github.com/users/bitpay","html_url":"https://github.com/bitpay","followers_url":"https://api.github.com/users/bitpay/followers","following_url":"https://api.github.com/users/bitpay/following{/other_user}","gists_url":"https://api.github.com/users/bitpay/gists{/gist_id}","starred_url":"https://api.github.com/users/bitpay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bitpay/subscriptions","organizations_url":"https://api.github.com/users/bitpay/orgs","repos_url":"https://api.github.com/users/bitpay/repos","events_url":"https://api.github.com/users/bitpay/events{/privacy}","received_events_url":"https://api.github.com/users/bitpay/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bitpay/bitcore","description":"A pure and powerful JavaScript Bitcoin library","fork":false,"url":"https://api.github.com/repos/bitpay/bitcore","forks_url":"https://api.github.com/repos/bitpay/bitcore/forks","keys_url":"https://api.github.com/repos/bitpay/bitcore/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bitpay/bitcore/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bitpay/bitcore/teams","hooks_url":"https://api.github.com/repos/bitpay/bitcore/hooks","issue_events_url":"https://api.github.com/repos/bitpay/bitcore/issues/events{/number}","events_url":"https://api.github.com/repos/bitpay/bitcore/events","assignees_url":"https://api.github.com/repos/bitpay/bitcore/assignees{/user}","branches_url":"https://api.github.com/repos/bitpay/bitcore/branches{/branch}","tags_url":"https://api.github.com/repos/bitpay/bitcore/tags","blobs_url":"https://api.github.com/repos/bitpay/bitcore/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bitpay/bitcore/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bitpay/bitcore/git/refs{/sha}","trees_url":"https://api.github.com/repos/bitpay/bitcore/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bitpay/bitcore/statuses/{sha}","languages_url":"https://api.github.com/repos/bitpay/bitcore/languages","stargazers_url":"https://api.github.com/repos/bitpay/bitcore/stargazers","contributors_url":"https://api.github.com/repos/bitpay/bitcore/contributors","subscribers_url":"https://api.github.com/repos/bitpay/bitcore/subscribers","subscription_url":"https://api.github.com/repos/bitpay/bitcore/subscription","commits_url":"https://api.github.com/repos/bitpay/bitcore/commits{/sha}","git_commits_url":"https://api.github.com/repos/bitpay/bitcore/git/commits{/sha}","comments_url":"https://api.github.com/repos/bitpay/bitcore/comments{/number}","issue_comment_url":"https://api.github.com/repos/bitpay/bitcore/issues/comments{/number}","contents_url":"https://api.github.com/repos/bitpay/bitcore/contents/{+path}","compare_url":"https://api.github.com/repos/bitpay/bitcore/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bitpay/bitcore/merges","archive_url":"https://api.github.com/repos/bitpay/bitcore/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bitpay/bitcore/downloads","issues_url":"https://api.github.com/repos/bitpay/bitcore/issues{/number}","pulls_url":"https://api.github.com/repos/bitpay/bitcore/pulls{/number}","milestones_url":"https://api.github.com/repos/bitpay/bitcore/milestones{/number}","notifications_url":"https://api.github.com/repos/bitpay/bitcore/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bitpay/bitcore/labels{/name}","releases_url":"https://api.github.com/repos/bitpay/bitcore/releases{/id}","created_at":"2013-12-17T16:10:28Z","updated_at":"2015-05-15T00:15:16Z","pushed_at":"2015-05-15T18:29:24Z","git_url":"git://github.com/bitpay/bitcore.git","ssh_url":"git@github.com:bitpay/bitcore.git","clone_url":"https://github.com/bitpay/bitcore.git","svn_url":"https://github.com/bitpay/bitcore","homepage":"","size":24986,"stargazers_count":1489,"watchers_count":1489,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":358,"mirror_url":null,"open_issues_count":77,"forks":358,"open_issues":77,"watchers":1489,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bitpay/bitcore/pulls/1226"},"html":{"href":"https://github.com/bitpay/bitcore/pull/1226"},"issue":{"href":"https://api.github.com/repos/bitpay/bitcore/issues/1226"},"comments":{"href":"https://api.github.com/repos/bitpay/bitcore/issues/1226/comments"},"review_comments":{"href":"https://api.github.com/repos/bitpay/bitcore/pulls/1226/comments"},"review_comment":{"href":"https://api.github.com/repos/bitpay/bitcore/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bitpay/bitcore/pulls/1226/commits"},"statuses":{"href":"https://api.github.com/repos/bitpay/bitcore/statuses/26bd5a864a135c280baf13eee143fadc3be5f83b"}}}}