Remove SYNC_TRANSACTION_NOT_IN_BLOCK magic number #10186

pull jnewbery wants to merge 2 commits into bitcoin:master from jnewbery:remove_SYNC_TRANSACTION_NOT_IN_BLOCK_magic_number changing 2 files +13 −12
  1. jnewbery commented at 2:37 PM on April 11, 2017: member

    As suggested here: #9725 (review) @TheBlueMatt

  2. AddToWalletIfInvolvingMe should test pIndex, not posInBlock 714e4ad13d
  3. in src/wallet/wallet.cpp:1121 in 557495fa12 outdated
    1117 | @@ -1118,10 +1118,10 @@ void CWallet::MarkConflicted(const uint256& hashBlock, const uint256& hashTx)
    1118 |      }
    1119 |  }
    1120 |  
    1121 | -void CWallet::SyncTransaction(const CTransactionRef& ptx, const CBlockIndex *pindexBlockConnected, int posInBlock) {
    1122 | +void CWallet::SyncTransaction(const CTransactionRef& ptx, const CBlockIndex *pindexBlock, int posInBlock) {
    


    TheBlueMatt commented at 6:15 PM on April 11, 2017:

    Why rename this?


    jnewbery commented at 9:05 PM on April 11, 2017:

    because SyncTransaction is only ever called by a function which uses the variable name pindex, and only uses that variable to call another function that uses the variable name pindex (actually pIndex). Changing the variable name in the middle of the stack seems unnecessary. And since I'm already touching these lines, I might as well.

    I should have renamed this pindex, not pindexBlock. Doing that now.

  4. TheBlueMatt commented at 6:15 PM on April 11, 2017: member

    utACK 557495fa12ad8dbf2cba0a348be106ddde27348e

  5. Make CWallet::SyncTransactions() interface friendlier d0cd0bd6d9
  6. jnewbery force-pushed on Apr 11, 2017
  7. fanquake added the label Wallet on Apr 12, 2017
  8. jonasschnelli commented at 12:40 PM on April 12, 2017: contributor

    utACK d0cd0bd6d99bd28ca0014a715ad2b565b3f787a4

  9. laanwj merged this on Apr 13, 2017
  10. laanwj closed this on Apr 13, 2017

  11. laanwj referenced this in commit c9ff4f8ee6 on Apr 13, 2017
  12. PastaPastaPasta referenced this in commit 84963ad112 on May 20, 2019
  13. PastaPastaPasta referenced this in commit fb4964857a on May 20, 2019
  14. PastaPastaPasta referenced this in commit 173eddef03 on May 21, 2019
  15. PastaPastaPasta referenced this in commit 2c295ea28e on May 22, 2019
  16. PastaPastaPasta referenced this in commit ab634b2170 on May 22, 2019
  17. PastaPastaPasta referenced this in commit 34237011ef on May 22, 2019
  18. PastaPastaPasta referenced this in commit f8c8edb2bb on May 22, 2019
  19. PastaPastaPasta referenced this in commit 17474fb9ae on May 23, 2019
  20. UdjinM6 referenced this in commit 46d8299a4a on May 23, 2019
  21. PastaPastaPasta referenced this in commit 67e1dd6d82 on May 23, 2019
  22. PastaPastaPasta referenced this in commit e451325d6d on May 27, 2019
  23. barrystyle referenced this in commit e689df1f37 on Jan 22, 2020
  24. MarcoFalke 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-21 15:15 UTC

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