Spent per txout #116

pull sipa wants to merge 16 commits into bitcoin:master from sipa:spentpertxout changing 4 files +208 −90
  1. sipa commented at 10:20 pm on March 12, 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. spentpertxout: keep spent information for each wallet's txout instead of per tx. 757f0d6c36
  3. when creating transactions, select sources per txout instead of per tx aa7607186b
  4. bugfix: do not require vfSpent to have the same size as vout 00e0836027
  5. bugfix 8cf0d4ed17
  6. bugfix: do not count coinbases too early d2168d5dc8
  7. prospected available credit 5e2f9182fc
  8. cache for GetAvailableCredit, and dirtying cache when rescanning a9f8f1f4cd
  9. bugfix: dirtying on the wrong place d1fe7b65a1
  10. nicer description for mixed transactions acee1dc796
  11. bugfix: mark availablecredit cache dirty when spening 3a6ece2abe
  12. bugfix: do not select coinbases before they mature 34f9810da4
  13. merge with upstream 307c9317ed
  14. merge with upstream: bugfix 053aa26998
  15. merge with avoid tx fee ccefc58597
  16. add -pthread 68f3f61300
  17. optimization: move check for immature coinbase out of loop 4fa053aacb
  18. jgarzik commented at 6:09 pm on March 17, 2011: contributor
    We definitely want this change – but can you please resubmit a rebase against latest upstream, giving us one (or a few) clean commits?
  19. jgarzik closed this on Mar 17, 2011

  20. glv2 referenced this in commit c3d65cdf72 on Apr 26, 2014
  21. glv2 referenced this in commit 0a070d473c on Oct 12, 2014
  22. glv2 referenced this in commit fd2da0e406 on Oct 12, 2014
  23. sipa referenced this in commit a064934ec0 on Dec 4, 2014
  24. sipa referenced this in commit 87bddb7a3a on Dec 4, 2014
  25. sipa referenced this in commit eb6347679b on Dec 5, 2014
  26. glv2 referenced this in commit 53310a5219 on Dec 7, 2014
  27. dexX7 referenced this in commit cd05193726 on Jul 15, 2015
  28. gavinandresen referenced this in commit 4dc64c1204 on Mar 1, 2016
  29. glv2 referenced this in commit 07576a985a on Mar 22, 2016
  30. deadalnix referenced this in commit bb2cd94e09 on Jan 19, 2017
  31. lateminer referenced this in commit 74a00f38ac on Dec 9, 2017
  32. 0xartem referenced this in commit 018381ec61 on May 29, 2018
  33. cryptapus referenced this in commit 76e35a44c8 on Nov 15, 2018
  34. attilaaf referenced this in commit e44bdf8287 on Jan 13, 2020
  35. rajarshimaitra referenced this in commit 1cfd9dc7f6 on Mar 23, 2021
  36. cryptapus referenced this in commit 7da6bf535e on May 3, 2021
  37. DrahtBot locked this on Sep 8, 2021


sipa jgarzik


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-11-17 18:12 UTC

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