{"action":"created","issue":{"url":"https://api.github.com/repos/MetacoSA/NBitcoin/issues/122","labels_url":"https://api.github.com/repos/MetacoSA/NBitcoin/issues/122/labels{/name}","comments_url":"https://api.github.com/repos/MetacoSA/NBitcoin/issues/122/comments","events_url":"https://api.github.com/repos/MetacoSA/NBitcoin/issues/122/events","html_url":"https://github.com/MetacoSA/NBitcoin/pull/122","id":105953877,"number":122,"title":"Added an overloaded version of Verify method","user":{"login":"emrekenci","id":491735,"avatar_url":"https://avatars.githubusercontent.com/u/491735?v=3","gravatar_id":"","url":"https://api.github.com/users/emrekenci","html_url":"https://github.com/emrekenci","followers_url":"https://api.github.com/users/emrekenci/followers","following_url":"https://api.github.com/users/emrekenci/following{/other_user}","gists_url":"https://api.github.com/users/emrekenci/gists{/gist_id}","starred_url":"https://api.github.com/users/emrekenci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emrekenci/subscriptions","organizations_url":"https://api.github.com/users/emrekenci/orgs","repos_url":"https://api.github.com/users/emrekenci/repos","events_url":"https://api.github.com/users/emrekenci/events{/privacy}","received_events_url":"https://api.github.com/users/emrekenci/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-11T06:44:41Z","updated_at":"2015-09-14T19:17:04Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/MetacoSA/NBitcoin/pulls/122","html_url":"https://github.com/MetacoSA/NBitcoin/pull/122","diff_url":"https://github.com/MetacoSA/NBitcoin/pull/122.diff","patch_url":"https://github.com/MetacoSA/NBitcoin/pull/122.patch"},"body":"The overloaded method consistently returns false or true. The original method returns false in some cases and throws an exception in others. Added an out parameter for explanation of the result."},"comment":{"url":"https://api.github.com/repos/MetacoSA/NBitcoin/issues/comments/140180929","html_url":"https://github.com/MetacoSA/NBitcoin/pull/122#issuecomment-140180929","issue_url":"https://api.github.com/repos/MetacoSA/NBitcoin/issues/122","id":140180929,"user":{"login":"lontivero","id":127973,"avatar_url":"https://avatars.githubusercontent.com/u/127973?v=3","gravatar_id":"","url":"https://api.github.com/users/lontivero","html_url":"https://github.com/lontivero","followers_url":"https://api.github.com/users/lontivero/followers","following_url":"https://api.github.com/users/lontivero/following{/other_user}","gists_url":"https://api.github.com/users/lontivero/gists{/gist_id}","starred_url":"https://api.github.com/users/lontivero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lontivero/subscriptions","organizations_url":"https://api.github.com/users/lontivero/orgs","repos_url":"https://api.github.com/users/lontivero/repos","events_url":"https://api.github.com/users/lontivero/events{/privacy}","received_events_url":"https://api.github.com/users/lontivero/received_events","type":"User","site_admin":false},"created_at":"2015-09-14T19:17:04Z","updated_at":"2015-09-14T19:17:04Z","body":"I know @NicolasDorier doesn't agree with me in this point but returning a boolean is not ok, it should throw an exception. \r\n\r\nThink a moment about this: how should a dev use this code??\r\nLook, the following code looks hilarious, doesn't it?\r\n\r\n```\r\nstring explanation;\r\nvar isValid = Verify(tx, out explanation);\r\nif(!isValid){\r\n   if(explanation.StartsWith(\"Coin not found!\")\r\n   {\r\n       // Ok, and now what!? should I return another error code with another explanation?\r\n   }\r\n   else if(explanation.StartsWith(\"There are duplicate inputs\")\r\n   {\r\n   }\r\n  else ......\r\n  .......\r\n}\r\n```\r\n\r\nThe *explanation* parameter only has a very little sense for something like this:\r\n```\r\nstring explanation;\r\nvar isValid = Verify(tx, out explanation);\r\nif(!isValid){\r\n    Log(explanation);\r\n    //ok, again, and now what? return false?\r\n}\r\n```\r\n\r\nIMO this is wrong."}}