{"action":"created","issue":{"url":"https://api.github.com/repos/bitcoinj/bitcoinj/issues/1387","repository_url":"https://api.github.com/repos/bitcoinj/bitcoinj","labels_url":"https://api.github.com/repos/bitcoinj/bitcoinj/issues/1387/labels{/name}","comments_url":"https://api.github.com/repos/bitcoinj/bitcoinj/issues/1387/comments","events_url":"https://api.github.com/repos/bitcoinj/bitcoinj/issues/1387/events","html_url":"https://github.com/bitcoinj/bitcoinj/issues/1387","id":238308500,"number":1387,"title":"Wallet.FeeCalcuation is private, whilst used in public interface","user":{"login":"eaglerainbow","id":12811079,"avatar_url":"https://avatars1.githubusercontent.com/u/12811079?v=3","gravatar_id":"","url":"https://api.github.com/users/eaglerainbow","html_url":"https://github.com/eaglerainbow","followers_url":"https://api.github.com/users/eaglerainbow/followers","following_url":"https://api.github.com/users/eaglerainbow/following{/other_user}","gists_url":"https://api.github.com/users/eaglerainbow/gists{/gist_id}","starred_url":"https://api.github.com/users/eaglerainbow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eaglerainbow/subscriptions","organizations_url":"https://api.github.com/users/eaglerainbow/orgs","repos_url":"https://api.github.com/users/eaglerainbow/repos","events_url":"https://api.github.com/users/eaglerainbow/events{/privacy}","received_events_url":"https://api.github.com/users/eaglerainbow/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2017-06-24T10:03:34Z","updated_at":"2017-06-30T22:06:49Z","closed_at":"2017-06-30T20:24:25Z","body":"Hi folks,\r\n\r\nplaying around a little with bitcoinj, I came across an issue in visibility of the public API:\r\n\r\n* Note that the class `Wallet.FeeCalculation` is a private class (see also https://github.com/bitcoinj/bitcoinj/blob/943a139d0846afb4f1432a1cfcd3949f52dede28/core/src/main/java/org/bitcoinj/wallet/Wallet.java#L4834 )\r\n* Several lines below, however, method `calculateFee` is declared public and has the very same class as return type (see also https://github.com/bitcoinj/bitcoinj/blob/943a139d0846afb4f1432a1cfcd3949f52dede28/core/src/main/java/org/bitcoinj/wallet/Wallet.java#L4845 ).\r\n\r\nThus, either the class `Wallet.FeeCalculation` shall be made public, or the method shall be declared private. In the current state, no (external) consumer may use the method.\r\n\r\nBackground: I have a use case where I need to \"forward\" the amounts of incoming transactions to another address. However, the fees shall not be covered by the local wallet, but shall reduce the amount which is sent. Thus, I need to know the exact amount the fee estimation algorithm will produce beforehand.\r\nNB: Using `emptyWallet` is not an option to me, as there may be multiple transactions ongoing at the time of forwarding.\r\n\r\n\r\nThanks for checking!\r\nBest regards,\r\neaglerainbow"},"comment":{"url":"https://api.github.com/repos/bitcoinj/bitcoinj/issues/comments/312383198","html_url":"https://github.com/bitcoinj/bitcoinj/issues/1387#issuecomment-312383198","issue_url":"https://api.github.com/repos/bitcoinj/bitcoinj/issues/1387","id":312383198,"user":{"login":"eaglerainbow","id":12811079,"avatar_url":"https://avatars1.githubusercontent.com/u/12811079?v=3","gravatar_id":"","url":"https://api.github.com/users/eaglerainbow","html_url":"https://github.com/eaglerainbow","followers_url":"https://api.github.com/users/eaglerainbow/followers","following_url":"https://api.github.com/users/eaglerainbow/following{/other_user}","gists_url":"https://api.github.com/users/eaglerainbow/gists{/gist_id}","starred_url":"https://api.github.com/users/eaglerainbow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eaglerainbow/subscriptions","organizations_url":"https://api.github.com/users/eaglerainbow/orgs","repos_url":"https://api.github.com/users/eaglerainbow/repos","events_url":"https://api.github.com/users/eaglerainbow/events{/privacy}","received_events_url":"https://api.github.com/users/eaglerainbow/received_events","type":"User","site_admin":false},"created_at":"2017-06-30T22:06:49Z","updated_at":"2017-06-30T22:06:49Z","body":"As far as I could test e51428d, I'd say it'll solve my problem very nicely.  With it I would also get rid of some very ugly coding, which I had to implement as workaround.\r\nSo, good work!\r\n(Now, I only need that feature in a released version of bitcoinj 😋 )"}}
{"actor":{"display_login":"eaglerainbow"}}