Checks for null data transaction before issuing error to debug.log #7200

pull accraze wants to merge 3 commits into bitcoin:master from accraze:null-tx-debug changing 1 files +2 −1
  1. accraze commented at 2:11 AM on December 12, 2015: contributor

    CWalletTx::GetAmounts could not find output address for null data transactions, thus issuing an error in debug.log. This change checks to see if the transaction is OP_RETURN before issuing error.

    resolves #6142

  2. checks for null data transaction before debug.log
    CWalletTx::GetAmounts could not find output address for null data transactions, thus issuing an error in debug.log. This change checks to see if the transaction is OP_RETURN before issuing error.
    
    resolves #6142
    b6915b8239
  3. jonasschnelli added the label Wallet on Dec 12, 2015
  4. in src/wallet/wallet.cpp:None in b6915b8239 outdated
    1033 | @@ -1034,7 +1034,8 @@ void CWalletTx::GetAmounts(list<COutputEntry>& listReceived,
    1034 |  
    1035 |          // In either case, we need to get the destination address
    1036 |          CTxDestination address;
    1037 | -        if (!ExtractDestination(txout.scriptPubKey, address))
    1038 | +
    1039 | +        if (!ExtractDestination(txout.scriptPubKey, address) && txout.scriptPubKey[0] != OP_RETURN)
    


    jonasschnelli commented at 12:45 PM on December 12, 2015:

    Instead of checking txout.scriptPubKey[0] you should probably use CScript::IsUnspendable().

  5. jonasschnelli commented at 12:45 PM on December 12, 2015: contributor

    Concept ACK.

  6. wallet: check if tx scriptPubKey is unspendable c611acc38a
  7. fix logic for error log d812daf967
  8. accraze commented at 8:44 PM on December 12, 2015: contributor

    updated code to use CScript::IsUnspendable()

  9. sipa commented at 11:23 PM on December 12, 2015: member

    utACK

  10. jonasschnelli commented at 7:42 AM on December 14, 2015: contributor

    utACK

  11. laanwj merged this on Dec 14, 2015
  12. laanwj closed this on Dec 14, 2015

  13. laanwj referenced this in commit dc511dcfd9 on Dec 14, 2015
  14. laanwj referenced this in commit 06c6a58463 on Dec 14, 2015
  15. luke-jr referenced this in commit e8ae70c4da on Dec 28, 2015
  16. luke-jr referenced this in commit dbceefae09 on Dec 28, 2015
  17. luke-jr referenced this in commit ac68fad555 on Dec 28, 2015
  18. luke-jr referenced this in commit 3ff334b7ad on Dec 28, 2015
  19. luke-jr referenced this in commit 0f085580c5 on Dec 28, 2015
  20. luke-jr referenced this in commit 7509c86e73 on Dec 28, 2015
  21. MarcoFalke 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 15:15 UTC

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