Spent per txout #121

pull sipa wants to merge 2 commits into bitcoin:master from sipa:spent_per_txout changing 2 files +206 −88
  1. sipa commented at 9:13 pm on March 17, 2011: member

    This patch changes some internal structures to keep track of spentness of each wallet transaction output separately, to support partially-spent transactions. It contains:

    • an update to the data structures (vfSpent in CWalletTx instead of fSpent)
    • a backward-compatible update to the wallet disk format (written by Satoshi, Gavin knows). Old clients reading back an updated wallet will ignore partially spent transactions when creating new ones, and may report a wrong balance, though.
    • some helper functions (CWalletTx: IsSpent, MarkSpent, MarkDirty to reset cached values, GetAvailableCredit which only counts unredeemed outputs)
    • update to SelectCoins and CreateTransaction to select source transaction outputs separately instead of per whole transaction. This fixes the issue mentioned in http://www.bitcoin.org/smf/index.php?topic=3759.0

    The reason for writing this patch: i’m also working on an import/export wallet patch, where situations with partially spent transactions become hard to avoid.

    Everything except loading a new wallet into an old client is tested on the testnet, including crafted situations with partially-spent transactions.

  2. keep spent flag per txout, and update wallet db format 84899f4523
  3. select transaction outputs separately e008a01c20
  4. sipa commented at 9:58 pm on March 17, 2011: member
    Resubmitting with longer commit messages
  5. sipa closed this on Mar 17, 2011

  6. zathras-crypto referenced this in commit 8e879f0eb6 on Sep 9, 2014
  7. sipa referenced this in commit a064934ec0 on Dec 4, 2014
  8. sipa referenced this in commit 87bddb7a3a on Dec 4, 2014
  9. sipa referenced this in commit eb6347679b on Dec 5, 2014
  10. dexX7 referenced this in commit 761429fecd on Jul 8, 2015
  11. sidhujag referenced this in commit b404ac4b18 on Mar 1, 2016
  12. MarcoFalke referenced this in commit a3ca0ff31c on Mar 26, 2016
  13. deadalnix referenced this in commit 666d3b5132 on Jan 19, 2017
  14. jtimon referenced this in commit 570d3d00e3 on Apr 20, 2017
  15. classesjack referenced this in commit 403c2e70f8 on Jan 2, 2018
  16. 0xartem referenced this in commit 9109196651 on Jun 11, 2018
  17. attilaaf referenced this in commit 9f0551a2ba on Jan 13, 2020
  18. rajarshimaitra referenced this in commit bcd4704a82 on Mar 23, 2021
  19. rajarshimaitra referenced this in commit ff5ae783d4 on Aug 5, 2021
  20. DrahtBot locked this on Sep 8, 2021


sipa


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: 2024-06-18 07:12 UTC

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