0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-02-05 10:17:30 -05:00
bitcoin-bitcoin-core/src/bench
Wladimir J. van der Laan 735d6b57e7
Merge #16227: Refactor CWallet's inheritance chain
93ce4a0b6f Move WatchOnly stuff from SigningProvider to CWallet (Andrew Chow)
8f5b81e6ed Remove CCryptoKeyStore and move all of it's functionality into CWallet (Andrew Chow)
37a79a4fcc Move various SigningProviders to signingprovider.{cpp,h} (Andrew Chow)
16f8096e91 Move KeyOriginInfo to its own header file (Andrew Chow)
d9becff4e1 scripted-diff: rename CBasicKeyStore to FillableSigningProvider (Andrew Chow)
a913e3f2fb Move HaveKey static function from keystore to rpcwallet where it is used (Andrew Chow)
c7797ec655 Remove CKeyStore and squash into CBasicKeyStore (Andrew Chow)
1b699a5083 Add HaveKey and HaveCScript to SigningProvider (Andrew Chow)

Pull request description:

  This PR compresses the `CWallet` chain of inheritance from 5 classes to 3 classes. `CBasicKeyStore` is renamed to `FillableSigningProvider` and some parts of it (the watchonly parts) are moved into `CWallet`. `CKeyStore` and `CCrypoKeyStore` are completely removed. `CKeyStore`'s `Have*` functions are moved into `SigningProvider` and the `Add*` moved into `FillableSigningProvider`, thus allowing it to go away entirely. `CCryptoKeyStore`'s functionality is moved into `CWallet`. The new inheritance chain is:

  ```
  SigningProvider -> FillableSigningProvider -> CWallet
  ```

  `SigningProvider` now is the class the provides keys and scripts and indicates whether keys and scripts are present. `FillableSigningProvider` allows keys and scripts to be added to the signing provider via `Add*` functions. `CWallet` handles all of the watchonly stuff (`AddWatchOnly`, `HaveWatchOnly`, `RemoveWatchOnly` which were previously in `CKeyStore`) and key encryption (previously in `CCryptoKeyStore`).

  Implements the 2nd [prerequisite](https://github.com/bitcoin-core/bitcoin-devwiki/wiki/Wallet-Class-Structure-Changes#cwallet-subclass-stack) from the wallet restructure.

ACKs for top commit:
  Sjors:
    re-ACK 93ce4a0; it keeps `EncryptSecret`, `DecryptSecret` and `DecryptKey` in `wallet/crypter.cpp`, but makes them not static. It improves alphabetical includes, reorders some function definitions, fixes commit message, brings back lost code comment.
  instagibbs:
    utACK 93ce4a0b6f

Tree-SHA512: 393dfd0623ad2dac38395eb89b862424318d6072f0b7083c92a0d207fd032c48b284f5f2cb13bc492f34557de350c5fee925da02e47daf011c5c6930a721b6d3
2019-07-11 22:42:39 +02:00
..
data Add deserialize + CheckBlock benchmarks, and a full block hex 2016-11-09 11:27:59 -08:00
.gitignore Ignore bench_bitcoin binary. 2015-10-06 17:46:12 +02:00
base58.cpp Make reasoning about dependencies easier by not including unused dependencies 2019-06-02 17:15:23 +02:00
bech32.cpp Make reasoning about dependencies easier by not including unused dependencies 2019-06-02 17:15:23 +02:00
bench.cpp [refactor] interfaces: Add missing LockAnnotation for cs_main 2019-05-13 14:46:01 -04:00
bench.h Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
bench_bitcoin.cpp scripted-diff: Replace fprintf with tfm::format 2019-06-13 10:32:52 -04:00
block_assemble.cpp scripted-diff: Bump copyright headers in test, bench 2019-04-11 13:34:43 -04:00
ccoins_caching.cpp Move various SigningProviders to signingprovider.{cpp,h} 2019-07-09 16:20:18 -04:00
chacha20.cpp Make reasoning about dependencies easier by not including unused dependencies 2019-06-02 17:15:23 +02:00
chacha_poly_aead.cpp Add ChaCha20Poly1305@Bitcoin AEAD benchmark 2019-07-03 11:49:47 +02:00
checkblock.cpp bench: Move generated data to a dedicated translation unit 2019-07-02 18:11:15 +01:00
checkqueue.cpp Make reasoning about dependencies easier by not including unused dependencies 2019-06-02 17:15:23 +02:00
coin_selection.cpp bitcoin-wallet tool: Drop MakeChain calls 2019-04-10 09:51:37 -04:00
crypto_hash.cpp Make reasoning about dependencies easier by not including unused dependencies 2019-06-02 17:15:23 +02:00
data.cpp bench: Move generated data to a dedicated translation unit 2019-07-02 18:11:15 +01:00
data.h bench: Move generated data to a dedicated translation unit 2019-07-02 18:11:15 +01:00
duplicate_inputs.cpp Make reasoning about dependencies easier by not including unused dependencies 2019-06-02 17:15:23 +02:00
examples.cpp Make reasoning about dependencies easier by not including unused dependencies 2019-06-02 17:15:23 +02:00
gcs_filter.cpp blockfilter: Refactor GCS params into struct. 2018-11-06 09:12:54 -08:00
lockedpool.cpp Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
mempool_eviction.cpp test: Add missing validation locks 2018-12-17 14:27:29 -05:00
merkle_root.cpp Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
poly1305.cpp Add Poly1305 bench 2019-03-26 18:12:31 +01:00
prevector.cpp Drop defunct IS_TRIVIALLY_CONSTRUCTIBLE handling from prevector.h 2018-11-14 12:19:04 -05:00
rollingbloom.cpp bench: Add benchmark for CRollingBloomFilter::reset 2019-05-22 15:55:50 +01:00
rpc_blockchain.cpp bench: Benchmark blockToJSON 2019-07-05 17:53:57 +03:00
rpc_mempool.cpp Make reasoning about dependencies easier by not including unused dependencies 2019-06-02 17:15:23 +02:00
util_time.cpp util: Add type safe GetTime 2019-05-23 14:12:32 -04:00
verify_script.cpp Make reasoning about dependencies easier by not including unused dependencies 2019-06-02 17:15:23 +02:00
wallet_balance.cpp Make reasoning about dependencies easier by not including unused dependencies 2019-06-02 17:15:23 +02:00