{"action":"closed","issue":{"url":"https://api.github.com/repos/bitcoin/bitcoin/issues/6142","labels_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/6142/labels{/name}","comments_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/6142/comments","events_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/6142/events","html_url":"https://github.com/bitcoin/bitcoin/issues/6142","id":76571046,"number":6142,"title":"Null data transactions are treated as unknown transaction in log messages","user":{"login":"dasconnor","id":3431073,"avatar_url":"https://avatars.githubusercontent.com/u/3431073?v=3","gravatar_id":"","url":"https://api.github.com/users/dasconnor","html_url":"https://github.com/dasconnor","followers_url":"https://api.github.com/users/dasconnor/followers","following_url":"https://api.github.com/users/dasconnor/following{/other_user}","gists_url":"https://api.github.com/users/dasconnor/gists{/gist_id}","starred_url":"https://api.github.com/users/dasconnor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dasconnor/subscriptions","organizations_url":"https://api.github.com/users/dasconnor/orgs","repos_url":"https://api.github.com/users/dasconnor/repos","events_url":"https://api.github.com/users/dasconnor/events{/privacy}","received_events_url":"https://api.github.com/users/dasconnor/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/bitcoin/bitcoin/labels/Docs%20and%20Output","name":"Docs and Output","color":"02d7e1"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-15T03:02:18Z","updated_at":"2015-12-14T12:08:43Z","closed_at":"2015-12-14T12:08:43Z","body":"I have an application that makes a lot of listunspent rpc calls and issues a lot of null data OP_RETURN transactions. Bitcoind tracks the addresses that these OP_RETURN transactions are made from and when it calls listunspent (or getbalance or listaccounts) it calls CWalletTx::GetAmounts, which cannot find the output address for the transaction. Since it sees OP_RETURN transactions, it can't find an address and issues the error in debug.log: \r\n\r\n2015-05-15 02:28:42 CWalletTx::GetAmounts: Unknown transaction type found, txid 09c22cb5e360ed4d048a659992ace972c19e2f13e2cbd9eca84c6e1b92626e65\r\n\r\nThe user level behavior returns the correct results, but because my application has a high volume of rpc calls and transactions, the log very quickly fills up with these extraneous error messages and crashes the application. The simple fix is to check if the transaction is an OP_RETURN, and if it is not issue the debug.log statement."}}