Replace send-to-self with dual send+receive entries #119

pull luke-jr wants to merge 5 commits into bitcoin-core:master from luke-jr:rm_send2self changing 6 files +81 −92
  1. luke-jr commented at 8:37 pm on October 27, 2020: member

    Makes the GUI transaction list more like the RPC, and IMO clearer in general.

    As a side effect, this also fixes the GUI entries when a transaction is a net profit to us, but some inputs were also from us.

    Originally https://github.com/bitcoin/bitcoin/pull/15115

    Has Concept ACKs from @*Empact @*jonasschnelli

  2. maflcko renamed this:
    GUI: Replace send-to-self with dual send+receive entries
    Replace send-to-self with dual send+receive entries
    on Oct 28, 2020
  3. promag commented at 2:03 pm on October 28, 2020: contributor
    Concept ACK.
  4. DrahtBot added the label Needs rebase on Dec 1, 2020
  5. rebroad commented at 10:57 am on March 29, 2021: contributor
    @luke-jr what’s the difference between raising a pull on this repository vs the bitcoin repository (as per your original 15115 pull request)? Sorry to ask this here but I’m unsure of where best to ask this.
  6. hebasto commented at 3:48 pm on March 29, 2021: member

    @rebroad

    @luke-jr what’s the difference between raising a pull on this repository vs the bitcoin repository (as per your original 15115 pull request)? Sorry to ask this here but I’m unsure of where best to ask this.

    Moving into the GUI repo was requested explicitly by @fanquake.

  7. maflcko commented at 3:54 pm on March 29, 2021: contributor
  8. hebasto added the label Wallet on Apr 19, 2021
  9. in src/qt/transactionrecord.cpp:80 in 77a74aac44 outdated
    147+
    148+                TransactionRecord sub(hash, nTime);
    149+                sub.idx = i;
    150+                sub.involvesWatchAddress = involvesWatchAddress;
    151+
    152+                if (!boost::get<CNoDestination>(&wtx.txout_address[i]))
    


    jarolrod commented at 3:46 am on July 6, 2021:

    When rebasing, please use std::get_if instead of boost::get here as refactoring work has been done to move away from the boost dependency in such cases, see: https://github.com/bitcoin/bitcoin/pull/20480/

    0                if (!std::get_if<CNoDestination>(&wtx.txout_address[i]))
    

    luke-jr commented at 11:23 pm on July 6, 2021:
    This was “automatic” resolving merge conflicts in rebasing.
  10. Rspigler commented at 11:01 pm on July 6, 2021: contributor
    Concept ACK
  11. luke-jr force-pushed on Jul 6, 2021
  12. luke-jr commented at 11:24 pm on July 6, 2021: member
  13. DrahtBot removed the label Needs rebase on Jul 6, 2021
  14. Rspigler commented at 3:58 am on July 7, 2021: contributor
    Will build/test tomorrow
  15. in src/qt/transactionrecord.cpp:44 in df1b5b8e33 outdated
    41+    isminetype fAllFromMe = ISMINE_SPENDABLE;
    42+    bool any_from_me = false;
    43+    if (wtx.is_coinbase) {
    44+        fAllFromMe = ISMINE_NO;
    45+    } else {
    46+        any_from_me = false;
    


    promag commented at 10:19 am on November 9, 2021:

    df1b5b8e33fa4b7f26eb7b47bcffb61837d77f28

    remove, unnecessary


    luke-jr commented at 1:18 am on March 1, 2022:
    done
  16. promag commented at 11:08 am on November 9, 2021: contributor
    Tested ACK and light code review aa744e4382. Will post full review.
  17. DrahtBot added the label Needs rebase on Jan 11, 2022
  18. luke-jr force-pushed on Mar 1, 2022
  19. luke-jr commented at 1:18 am on March 1, 2022: member
    Rebased
  20. DrahtBot removed the label Needs rebase on Mar 1, 2022
  21. Rspigler commented at 2:17 am on March 2, 2022: contributor

    Getting:

    terminate called after throwing an instance of ‘std::runtime_error’ what(): JSON value is not a string as expected Aborted

    when trying to open bitcoin-qt after compiling 2bb4e30.

    Edit: I’m getting this on master too

  22. hebasto requested review from achow101 on Jun 1, 2022
  23. hebasto commented at 3:49 pm on October 26, 2022: member
  24. achow101 commented at 6:01 pm on October 26, 2022: member

    ACK 2bb4e3076342162cab9b359e020c7f189db9d399

    Tested that it does indeed split up send-to-self payments.

  25. hebasto commented at 9:20 am on October 27, 2022: member

    Tested 2bb4e3076342162cab9b359e020c7f189db9d399 on Ubuntu 22.04:

    • the master branch: image

    • this PR: image

  26. hebasto commented at 9:23 am on October 27, 2022: member

    The first commit 880b15199fa2d5efb681017ab86620c657910d2d fails to compile:

    0qt/transactionrecord.cpp: In static member function static QList<TransactionRecord> TransactionRecord::decomposeTransaction(const interfaces::WalletTx&):
    1qt/transactionrecord.cpp:46:22: error: ISMINE_NO was not declared in this scope; did you mean wallet::ISMINE_NO’?
    2   46 |         fAllFromMe = ISMINE_NO;
    3      |                      ^~~~~~~~~
    4      |                      wallet::ISMINE_NO
    5In file included from qt/transactionrecord.cpp:10:
    6./wallet/ismine.h:42:5: note: wallet::ISMINE_NO declared here
    7   42 |     ISMINE_NO         = 0,
    8      |     ^~~~~~~~~
    
  27. hebasto commented at 7:04 pm on December 6, 2022: member
    @luke-jr Are you planning to address #119#pullrequestreview-1157914417?
  28. DrahtBot commented at 7:04 pm on December 6, 2022: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK hebasto
    Concept ACK Rspigler
    Stale ACK promag, achow101

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

    Conflicts

    No conflicts as of last run.

  29. GUI: TransactionRecord: Use "any from me" as the criteria for deciding whether a transaction is a send or receive
    This changes behaviour (IMO for the better) in the case where some but not all inputs are from us, and the net amount is positive.
    b9765ba1d6
  30. GUI: TransactionRecord: Refactor to turn send-to-self into send+receive pairs f3fbe99fcf
  31. GUI: Remove SendToSelf TransactionRecord type 71fbdb7f40
  32. Bugfix: Ignore ischange flag when we're not the sender
    If we didn't send it, it can't possibly be change, even if that's the key's purpose
    2d182f77cd
  33. GUI: TransactionRecord: When time/index/etc match, sort send before receive 099dbe4224
  34. luke-jr force-pushed on Jun 23, 2023
  35. luke-jr commented at 2:08 am on June 23, 2023: member

    The first commit 880b151 fails to compile:

    Fixed. Remaining commits are identical.

  36. luke-jr requested review from hebasto on Jun 23, 2023
  37. luke-jr requested review from promag on Jun 23, 2023
  38. luke-jr requested review from jarolrod on Jun 23, 2023
  39. in src/qt/transactionrecord.cpp:58 in f3fbe99fcf outdated
    92-    }
    93-    else
    94-    {
    95-        isminetype fAllToMe = ISMINE_SPENDABLE;
    96+    if (fAllFromMe || !any_from_me) {
    97         for (const isminetype mine : wtx.txout_is_mine)
    


    achow101 commented at 11:12 pm on July 14, 2023:

    In f3fbe99fcf90daec79d49fd5d868102dc99feb23 “GUI: TransactionRecord: Refactor to turn send-to-self into send+receive pairs”

    This for loop seems to be duplicated from the one above. I think this could be refactored so that we don’t need to duplicate this work?

  40. hebasto approved
  41. hebasto commented at 5:25 pm on September 22, 2023: member

    ACK 099dbe4224e0e896604e7f6901d0fc302b0bd3a0.

    Going to merge it, leaving further improvements for follow-ups.

  42. DrahtBot requested review from achow101 on Sep 22, 2023
  43. hebasto merged this on Sep 22, 2023
  44. hebasto closed this on Sep 22, 2023

  45. Frank-GER referenced this in commit 591d9a41ca on Sep 25, 2023
  46. bitcoin-core deleted a comment on Sep 26, 2023
  47. sidhujag referenced this in commit 2fa8a37b6c on Sep 26, 2023
  48. ryanofsky referenced this in commit ebba56d34c on Sep 27, 2023
  49. ryanofsky referenced this in commit 1c6fb04ddd on Sep 27, 2023
  50. ryanofsky referenced this in commit 61d5a0e661 on Sep 27, 2023
  51. bitcoin-core locked this on Sep 25, 2024

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/gui. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-04 08:20 UTC

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