bitcoin/src/wallet
Wladimir J. van der Laan f0c9e1c22b
Merge #14906: refactor: Make explicit CMutableTransaction -> CTransaction conversion.
b301950df3  Made expicit constructor CTransaction(const CMutableTransaction &tx). (lucash-dev)
faf29dd019  Minimal changes to comply with explicit CMutableTransaction -> CTranaction conversion. (lucash-dev)

Pull request description:

  This PR is re-submission of #14156, which was automatically closed by github (glitch?)

  Original description:

  This PR makes explicit the now implicit conversion constructor `CTransaction(const CMutableTransaction&)` in `transaction.h`.
  Minimal changes were made elsewhere to make the code compilable. I'll follow up with other PRs to address individually refactoring functions that should have a `CMutableTransaction` version, or where a `CTransaction` should be reused.

  The rationale for this change is:

   - Conversion constructors should not be explicit unless there's a strong reason for it (in the opinion of, for example, https://google.github.io/styleguide/cppguide.html, and https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Ro-conversion. Let me know your take on this).
   - This particular conversion is very costly -- it implies a serialization plus hash of the transaction.
   - Even though `CTransaction` and `CMutableTransaction` represent the same data, they have very different use cases and performance properties.
   - Making it explicit allows for easier reasoning of performance trade-offs.
   - There has been previous performance issues caused by unneeded use of this implicit conversion.
   - This PR creates a map for places to look for possible refactoring and performance gains (this benefit still holds if the PR is not merged).

Tree-SHA512: 2427462e7211b5ffc7299dae17339d27f8c43266e0895690fda49a83c72751bd2489d4471b3993075a18f3fef25d741243e5010b2f49aeef4a9688b30b6d0631
2019-01-21 20:28:56 +01:00
..
test test: Run invalid_txs.InputMissing test in feature_block 2019-01-05 14:51:25 +01:00
coincontrol.cpp scripted-diff: Move util files to separate directory. 2018-11-04 22:46:07 -08:00
coincontrol.h Update copyright headers to 2018 2018-07-27 07:15:02 -04: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 Merge #14478: Show error to user when corrupt wallet unlock fails 2018-11-14 11:27:01 -05:00
crypter.h Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
db.cpp Merge #14268: Introduce SafeDbt to handle Dbt with free or memory_cleanse raii-style 2019-01-16 14:56:21 +01:00
db.h Merge #14268: Introduce SafeDbt to handle Dbt with free or memory_cleanse raii-style 2019-01-16 14:56:21 +01:00
feebumper.cpp Pass chain locked variables where needed 2018-11-06 11:44:40 -04:00
feebumper.h Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
fees.cpp scripted-diff: Move util files to separate directory. 2018-11-04 22:46:07 -08:00
fees.h Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
init.cpp rpc: Make unloadwallet wait for complete wallet unload 2019-01-15 00:01:00 +00:00
rpcdump.cpp [docs] Expand help text for importmulti changes 2019-01-15 17:24:46 -05:00
rpcwallet.cpp Merge #14906: refactor: Make explicit CMutableTransaction -> CTransaction conversion. 2019-01-21 20:28:56 +01:00
rpcwallet.h Simplify arguments to SignPSBTInput 2018-11-01 12:11:24 -07:00
wallet.cpp Merge #14906: refactor: Make explicit CMutableTransaction -> CTransaction conversion. 2019-01-21 20:28:56 +01:00
wallet.h Merge #14941: rpc: Make unloadwallet wait for complete wallet unload 2019-01-15 14:38:23 +01:00
walletdb.cpp Use C++11 default member initializers 2019-01-05 16:16:37 +01:00
walletdb.h [wallet] Kill accounts 2018-08-30 16:08:42 +02:00
walletutil.cpp Merge #14350: Add WalletLocation class 2018-11-05 13:17:03 +01:00
walletutil.h wallet: Add WalletLocation utility class 2018-10-25 11:53:17 +01:00