0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-02-20 12:12:41 -05:00
bitcoin-bitcoin-core/src/wallet
Ava Chow 011a895a82
Merge bitcoin/bitcoin#29015: kernel: Streamline util library
c7376babd1 doc: Clarify distinction between util and common libraries in libraries.md (Ryan Ofsky)
4f74c59334 util: Move util/string.h functions to util namespace (Ryan Ofsky)
4d05d3f3b4 util: add TransactionError includes and namespace declarations (Ryan Ofsky)
680eafdc74 util: move fees.h and error.h to common/messages.h (Ryan Ofsky)
02e62c6c9a common: Add PSBTError enum (Ryan Ofsky)
0d44c44ae3 util: move error.h TransactionError enum to node/types.h (Ryan Ofsky)
9bcce2608d util: move spanparsing.h to script/parsing.h (Ryan Ofsky)
6dd2ad4792 util: move spanparsing.h Split functions to string.h (Ryan Ofsky)
23cc8ddff4 util: move HexStr and HexDigit from util to crypto (TheCharlatan)
6861f954f8 util: move util/message to common/signmessage (Ryan Ofsky)
cc5f29fbea build: move memory_cleanse from util to crypto (Ryan Ofsky)
5b9309420c build: move chainparamsbase from util to common (Ryan Ofsky)
ffa27af24d test: Add check-deps.sh script to check for unexpected library dependencies (Ryan Ofsky)

Pull request description:

  Remove `fees.h`, `errors.h`, and `spanparsing.h` from the util library. Specifically:

  - Move `Split` functions from `util/spanparsing.h` to `util/string.h`, using `util` namespace for clarity.
  - Move remaining spanparsing functions to `script/parsing.h` since they are used for descriptor and miniscript parsing.
  - Combine `util/fees.h` and `util/errors.h` into `common/messages.h` so there is a place for simple functions that generate user messages to live, and these functions are not part of the util library.

  Motivation for this change is that the util library is a dependency of the kernel, and we should remove functionality from util that shouldn't be called by kernel code or kernel applications. These changes should also improve code organization and make functions easier to discover. Some of these same moves are (or were) part of #28690, but did not help with code organization, or made it worse, so it is better to move them and clean them up in the same PR so code only has to change one time.

ACKs for top commit:
  achow101:
    ACK c7376babd1
  TheCharlatan:
    Re-ACK c7376babd1
  hebasto:
    re-ACK c7376babd1.

Tree-SHA512: 5bcef16c1255463b1b69270548711e7ff78ca0dd34e300b95e3ca1ce52ceb34f83d9ddb2839e83800ba36b200de30396e504bbb04fa02c6d0c24a16d06ae523d
2024-06-12 17:12:54 -04:00
..
rpc Merge bitcoin/bitcoin#29015: kernel: Streamline util library 2024-06-12 17:12:54 -04:00
test Merge bitcoin/bitcoin#29015: kernel: Streamline util library 2024-06-12 17:12:54 -04:00
bdb.cpp bdb: Be able to make byteswapped databases 2024-05-16 15:03:13 -04:00
bdb.h bdb: Be able to make byteswapped databases 2024-05-16 15:03:13 -04:00
coincontrol.cpp wallet: Explicitly preserve scriptSig and scriptWitness in CreateTransaction 2023-12-08 17:12:19 -05:00
coincontrol.h wallet: Explicitly preserve scriptSig and scriptWitness in CreateTransaction 2023-12-08 17:12:19 -05:00
coinselection.cpp Fold GetSelectionWaste() into ComputeAndSetWaste() 2024-05-24 14:53:54 -04:00
coinselection.h Fold GetSelectionWaste() into ComputeAndSetWaste() 2024-05-24 14:53:54 -04:00
context.cpp
context.h interfaces: Add schedulerMockForward method so mockscheduler RPC can work across processes 2023-10-20 10:30:16 -04:00
crypter.cpp refactor: Remove unused C-style casts 2023-07-24 15:32:00 +02:00
crypter.h
db.cpp wallet: implement BerkeleyROBatch 2024-05-13 23:01:37 -04:00
db.h bdb: Be able to make byteswapped databases 2024-05-16 15:03:13 -04:00
dump.cpp bdb: Be able to make byteswapped databases 2024-05-16 15:03:13 -04:00
dump.h wallettool: Don't create CWallet when dumping DB 2023-12-19 16:54:06 -05:00
external_signer_scriptpubkeyman.cpp util: add TransactionError includes and namespace declarations 2024-05-16 10:16:08 -05:00
external_signer_scriptpubkeyman.h common: Add PSBTError enum 2024-05-16 10:16:08 -05:00
feebumper.cpp util: add TransactionError includes and namespace declarations 2024-05-16 10:16:08 -05:00
feebumper.h rpc: bumpfee, improve doc for 'reduce_output' arg 2023-09-26 20:17:02 -03:00
fees.cpp
fees.h
init.cpp Merge bitcoin/bitcoin#26606: wallet: Implement independent BDB parser 2024-05-21 10:05:09 +01:00
interfaces.cpp util: add TransactionError includes and namespace declarations 2024-05-16 10:16:08 -05:00
load.cpp util: Move util/string.h functions to util namespace 2024-05-16 10:16:08 -05:00
load.h interfaces: Add schedulerMockForward method so mockscheduler RPC can work across processes 2023-10-20 10:30:16 -04:00
migrate.cpp Error if LSNs are not reset 2024-05-16 15:03:13 -04:00
migrate.h Add MakeBerkeleyRODatabase 2024-05-16 15:03:13 -04:00
receive.cpp [clang-tidy] Enable the misc-no-recursion check 2024-04-07 14:04:45 +01:00
receive.h wallet: Add wallet/types.h for simple public enum and struct types 2023-04-11 15:52:25 -04:00
salvage.cpp tidy: modernize-use-emplace 2023-10-12 11:27:19 +02:00
salvage.h refactor: Move fs.* to util/fs.* 2023-03-23 12:55:18 +01:00
scriptpubkeyman.cpp util: Move util/string.h functions to util namespace 2024-05-16 10:16:08 -05:00
scriptpubkeyman.h util: add TransactionError includes and namespace declarations 2024-05-16 10:16:08 -05:00
spend.cpp Merge bitcoin/bitcoin#29015: kernel: Streamline util library 2024-06-12 17:12:54 -04:00
spend.h refactor: pass CRecipient to FundTransaction 2024-01-19 15:04:56 +01:00
sqlite.cpp scripted-diff: Add IWYU pragma keep to bitcoin-config.h includes 2024-05-01 08:33:04 +02:00
sqlite.h sqlite: Ensure that only one SQLiteBatch is writing to db at a time 2024-02-06 12:24:36 -05:00
transaction.cpp scripted-diff: wallet: s/TxStateConflicted/TxStateBlockConflicted 2024-03-14 17:38:39 -04:00
transaction.h util: Move util/string.h functions to util namespace 2024-05-16 10:16:08 -05:00
types.h util: move error.h TransactionError enum to node/types.h 2024-05-16 10:16:08 -05:00
wallet.cpp Merge bitcoin/bitcoin#29015: kernel: Streamline util library 2024-06-12 17:12:54 -04:00
wallet.h common: Add PSBTError enum 2024-05-16 10:16:08 -05:00
walletdb.cpp Merge bitcoin/bitcoin#26606: wallet: Implement independent BDB parser 2024-05-21 10:05:09 +01:00
walletdb.h wallet: db, introduce 'RunWithinTxn()' helper function 2024-02-12 16:05:14 -03:00
wallettool.cpp Merge bitcoin/bitcoin#26606: wallet: Implement independent BDB parser 2024-05-21 10:05:09 +01:00
wallettool.h
walletutil.cpp wallet, descspkm: Refactor wallet descriptor generation to standalone func 2024-03-20 16:15:43 -04:00
walletutil.h wallet, descspkm: Refactor wallet descriptor generation to standalone func 2024-03-20 16:15:43 -04:00