bitcoin/src/wallet
Wladimir J. van der Laan 8f604361eb
Merge #16194: refactor: share blockmetadata with BlockManager
682a1d0f20 refactoring: remove mapBlockIndex global (James O'Beirne)
55d525ab90 refactoring: make pindexBestInvalid internal to validation.cpp (James O'Beirne)
4ed55dfcd7 refactoring: add block_index_candidates arg to LoadBlockIndex (James O'Beirne)
613c46fe9e refactoring: move block metadata structures into BlockManager (James O'Beirne)

Pull request description:

  This is part of the [assumeutxo project](https://github.com/bitcoin/bitcoin/projects/11):

  Parent PR: #15606
  Issue: #15605
  Specification: https://github.com/jamesob/assumeutxo-docs/tree/2019-04-proposal/proposal

  ---

  Under an assumeutxo model, we have multiple CChainState instances in use at once in order to support background validation. Currently, each CChainState instance has its own mapBlockIndex, a collection of linked block headers, in addition to a few other data structures that are related to maintenance of the block tree but not necessarily to any given chainstate.

  In order to avoid duplicating this data across chainstates, this change moves chainstate-agnostic block metadata (and related behavior) into a class, `BlockManager`. Chainstates are parameterized with a reference to a blockmanager instance and in practice they share the same instance.

  Most of this change is conceptually move-only, though the diff is somewhat muddled. The first commit can be reviewed slightly more easily with `--color-moved=dimmed_zebra`. Admittedly, that commit is pretty unwieldy; I tried to split it up after the fact with `git add --patch`, but that was difficult because of git's inability to split hunks past a certain point. Some of the moves also ended up being obscured when done over separate commits.

ACKs for top commit:
  MarcoFalke:
    ACK 682a1d0f20
  ryanofsky:
    utACK 682a1d0f20, only changes since last review were rebase and fixing conflict on a moved line
  ariard:
    utACK 682a1d0. Most of the changes are move-only, with main problem being to avoid creating circular dependencies between `BlockManager` and `CChainState`. Tested, comments are mostly nits, feel free to ignore them

Tree-SHA512: 738d8d06539ba53acf4bd2d48ae000473e645bbc4e63d798d55d247a4d5a4f781b73538ed590f6407be9ab402ea9d395570ea20bff0a4b9ce747bcc1600c5108
2019-07-16 18:48:07 +02:00
..
test Merge #16194: refactor: share blockmetadata with BlockManager 2019-07-16 18:48:07 +02:00
coincontrol.cpp wallet: avoid reuse flags 2019-05-29 18:40:31 +09:00
coincontrol.h wallet: avoid reuse flags 2019-05-29 18:40:31 +09:00
coinselection.cpp Introduce a Shuffle for FastRandomContext and use it in wallet and coinselection 2018-12-12 14:22:12 -08:00
coinselection.h amount: Move CAmount CENT to unit test header 2018-09-17 14:34:56 -04:00
crypter.cpp Remove CCryptoKeyStore and move all of it's functionality into CWallet 2019-07-09 16:20:18 -04:00
crypter.h Remove CCryptoKeyStore and move all of it's functionality into CWallet 2019-07-09 16:20:18 -04:00
db.cpp Make reasoning about dependencies easier by not including unused dependencies 2019-06-02 17:15:23 +02:00
db.h scripted-diff: Bump copyright headers in wallet 2019-05-06 14:05:52 -04:00
feebumper.cpp Replace CReserveKey with ReserveDestinatoin 2019-07-09 16:43:10 -04:00
feebumper.h scripted-diff: Bump copyright headers in wallet 2019-05-06 14:05:52 -04:00
fees.cpp [wallet] abort when attempting to fund a transaction above maxtxfee 2019-06-28 22:44:38 -04:00
fees.h Remove uses of fee globals in wallet code 2019-02-22 15:43:02 -04:00
init.cpp [build]: use #if HAVE_SYSTEM instead of defined(HAVE_SYSTEM) 2019-07-05 18:32:05 +02:00
ismine.cpp Move various SigningProviders to signingprovider.{cpp,h} 2019-07-09 16:20:18 -04:00
ismine.h Change ismine to take a CWallet instead of CKeyStore 2019-06-19 18:06:30 -04:00
load.cpp scripted-diff: Bump copyright headers in wallet 2019-05-06 14:05:52 -04:00
load.h scripted-diff: Bump copyright headers in wallet 2019-05-06 14:05:52 -04:00
psbtwallet.cpp Merge #15427: Add support for descriptors to utxoupdatepsbt 2019-07-02 16:53:22 +02:00
psbtwallet.h Remove unused TransactionError constants 2019-02-14 10:32:02 -05:00
rpcdump.cpp rpc: switch to using RPCHelpMan.Check() 2019-07-08 09:53:52 +09:00
rpcwallet.cpp Merge #16227: Refactor CWallet's inheritance chain 2019-07-11 22:42:39 +02:00
rpcwallet.h Merge #15870: wallet: Only fail rescan when blocks have actually been pruned 2019-05-16 11:18:27 -04:00
wallet.cpp Merge #16227: Refactor CWallet's inheritance chain 2019-07-11 22:42:39 +02:00
wallet.h Merge #16227: Refactor CWallet's inheritance chain 2019-07-11 22:42:39 +02:00
walletdb.cpp scripted-diff: Bump copyright headers in wallet 2019-05-06 14:05:52 -04:00
walletdb.h Have WalletBatch automatically flush every 1000 updates 2019-05-18 12:58:50 -04:00
wallettool.cpp scripted-diff: Replace fprintf with tfm::format 2019-06-13 10:32:52 -04:00
wallettool.h Move ismine to wallet module 2019-06-19 18:06:30 -04:00
walletutil.cpp Merge #15870: wallet: Only fail rescan when blocks have actually been pruned 2019-05-16 11:18:27 -04:00
walletutil.h wallet: Add WalletLocation utility class 2018-10-25 11:53:17 +01:00