detection of conflicts between wallet tx’s and the blockchain #195

pull sipa wants to merge 1 commits into bitcoin:master from sipa:rejectedtx changing 7 files +240 −72
  1. sipa commented at 3:23 pm on May 5, 2011: member

    Changes:

    • added mapWalletInputs to track wallet tx’s that use a certain outpoint
    • added AddWalletTx to update mapWallet and keep mapWalletInputs up-to-date
    • CWalletTx’s can be in a rejected state and optionally “conflicting”, in which case they are ignored for balances and coin selection.
    • rejected tx’s are stored separately in wallet.dat (as ‘rejtx’ key, and with an additional ‘rejected’ field)
    • new function MarkConflicting() marks a tx conflicting, and all dependent wallet transactions rejected.
    • a new function SyncWithWallet will do both adding to the block chain and check for conflicts, and is called when connecting blocks, for incoming transactions, and when rescanning
    • WalletUpdateSpend works now per-transaction, and is not called anymore from script, but from AddToWallet and SyncWithWallet
    • GUI is updated to show rejected transactions as “rejected” instead of “0/unconfirmed”, with credit and debet 0 (like unmatured generations)

    Re-enabling of transactions after they would stop being conflicting after a block chain reorganisation is not supported yet. The is no RPC call to retrieve information about rejected transactions.

  2. sipa commented at 4:52 pm on May 6, 2011: member
  3. detection of conflicts between wallet tx's and the blockchain
    Changes:
    * added mapWalletInputs to track wallet tx's that use a certain outpoint
    * added AddWalletTx to update mapWallet and keep mapWalletInputs up-to-date
    * CWalletTx's can be in a rejected state and optionally "conflicting", in
    which case they are ignored for balances and coin selection.
    * rejected tx's are stored separately in wallet.dat (as 'rejtx' key, and
    with an additional 'rejected' field)
    * new function MarkConflicting() marks a tx conflicting, and all dependent
    wallet transactions rejected.
    * a new function SyncWithWallet will do both adding to the block chain and
    check for conflicts, and is called when connecting blocks, for incoming
    transactions, and when rescanning
    * WalletUpdateSpend works now per-transaction, and is not called anymore
    from script, but from AddToWallet and SyncWithWallet
    * GUI is updated to show rejected transactions as "rejected" instead of
    "0/unconfirmed", with credit and debet 0 (like unmatured generations)
    
    Re-enabling of transactions after they would stop being conflicting after
    a block chain reorganisation is not supported yet. The is no RPC call to
    retrieve information about rejected transactions.
    70a01202cf
  4. jgarzik commented at 3:55 am on July 15, 2011: contributor
    Needs an update/rebase, since we’re wanting wallet import/export?
  5. sipa commented at 1:39 pm on September 26, 2011: member
    Needs an update indeed, I’ll close the request until then.
  6. sipa closed this on Sep 26, 2011

  7. msgilligan referenced this in commit c719358c13 on Nov 18, 2014
  8. sipa referenced this in commit 9d09322b41 on Mar 27, 2015
  9. dexX7 referenced this in commit 0b6ff88189 on Aug 26, 2015
  10. TheBlueMatt referenced this in commit 582b2934e6 on Oct 20, 2015
  11. deadalnix referenced this in commit e7abd0299f on Jan 3, 2017
  12. deadalnix referenced this in commit e84e761915 on Jan 19, 2017
  13. lateminer referenced this in commit 40e8ae7132 on Dec 9, 2017
  14. classesjack referenced this in commit af9f7de379 on Jan 2, 2018
  15. attilaaf referenced this in commit fbf73e40fc on Jan 13, 2020
  16. cryptapus referenced this in commit 4cd859c5ba on May 3, 2021
  17. rajarshimaitra referenced this in commit af6b431265 on Aug 5, 2021
  18. DrahtBot locked this on Sep 8, 2021


sipa jgarzik

Labels
Feature


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

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