Null data transactions are treated as unknown transaction in log messages #6142

issue dasconnor opened this issue on May 15, 2015
  1. dasconnor commented at 3:02 AM on May 15, 2015: none

    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:

    2015-05-15 02:28:42 CWalletTx::GetAmounts: Unknown transaction type found, txid 09c22cb5e360ed4d048a659992ace972c19e2f13e2cbd9eca84c6e1b92626e65

    The 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.

  2. laanwj added the label Docs and Output on May 18, 2015
  3. sipa commented at 11:33 PM on July 9, 2015: member

    Sounds reasonable to. Feel free to PR.

  4. accraze referenced this in commit b6915b8239 on Dec 12, 2015
  5. laanwj closed this on Dec 14, 2015

  6. laanwj referenced this in commit 06c6a58463 on Dec 14, 2015
  7. luke-jr referenced this in commit e8ae70c4da on Dec 28, 2015
  8. luke-jr referenced this in commit 3ff334b7ad on Dec 28, 2015
  9. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-21 18:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me