Restructure credit transaction decomposition (solves UI issue #689) #800

pull laanwj wants to merge 1 commits into bitcoin:master from laanwj:decomposetransfix changing 1 files +23 −37
  1. laanwj commented at 11:05 AM on February 5, 2012: member

    When a transaction has multiple outputs that go to the wallet, list these as multiple transactions in the UI.

    This is also applied to generated (coinbase) transactions.

    Also makes the code shorter and easier to understand.

    This does need some testing.

  2. Restructure credit transaction decomposition (solves issue #689)
    When a transaction has multiple outputs that go to the wallet, list these
    as multiple transactions in the UI. This is also applied to generated
    (coinbase) transactions. Also makes the code shorter and easier
    to understand.
    ab07866c8d
  3. in src/qt/transactionrecord.cpp:None in cf44548c72 outdated
     103 | +                        sub.type = TransactionRecord::RecvWithAddress;
     104 | +                        sub.address = address.ToString();
     105 | +                    }
     106 | +                    else
     107 | +                    {
     108 | +                        // Received by IP connection, or other non-address transaction such as OP_EVAL
    


    gavinandresen commented at 2:53 PM on February 6, 2012:

    OP_EVAL is no more. How about: // Received by IP connection (deprecated features), or a multisignature or other non-simple transaction

  4. laanwj commented at 5:13 PM on February 6, 2012: member

    Updated comment

  5. gavinandresen merged this on Feb 6, 2012
  6. gavinandresen closed this on Feb 6, 2012

  7. Plaidxx commented at 6:27 AM on February 18, 2012: none

    Here are a couple (probably stupid) questions:

    1. sub.idx is set now, and wasn't previously, why?
    2. Is there a difference between using wallet->GetCredit(txout) and txout.nValue to get the value for sub.credit (for generated coins)
    3. Will wallet->IsMine(txout) be true for generated coins and non-address or non-simple transactions? (Previously it was only checked for transactions received via an address)

    Thanks in advance. There is a somewhat steep learning curve in getting acquainted with the Bitcoin code base. :)

  8. laanwj commented at 8:04 AM on February 18, 2012: member

    @plaid:

    1. sub.idx is a sorting key, used to sort multiple transactions with the same txid. Previously it just defaulted to 0.
    2. wallet->GetCredit(txout) counts the credit for the entire transaction, for all outputs that are owned by the wallet. It performs the same looping over outputs that is now done manually.
    3. Yes, ismine is true for all outputs that the wallet owns the private key for.
  9. Plaidxx commented at 4:47 PM on February 18, 2012: none

    @laanwj I appreciate you taking the time to answer my admittedly elementary questions. They all make perfect sense now.

  10. laanwj deleted the branch on Apr 9, 2014
  11. destenson referenced this in commit 3e15bf47d0 on Jun 26, 2016
  12. ptschip referenced this in commit 5b9b27fbe2 on Oct 17, 2017
  13. 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-13 15:16 UTC

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