c7376babd1doc: Clarify distinction between util and common libraries in libraries.md (Ryan Ofsky)4f74c59334util: Move util/string.h functions to util namespace (Ryan Ofsky)4d05d3f3b4util: add TransactionError includes and namespace declarations (Ryan Ofsky)680eafdc74util: move fees.h and error.h to common/messages.h (Ryan Ofsky)02e62c6c9acommon: Add PSBTError enum (Ryan Ofsky)0d44c44ae3util: move error.h TransactionError enum to node/types.h (Ryan Ofsky)9bcce2608dutil: move spanparsing.h to script/parsing.h (Ryan Ofsky)6dd2ad4792util: move spanparsing.h Split functions to string.h (Ryan Ofsky)23cc8ddff4util: move HexStr and HexDigit from util to crypto (TheCharlatan)6861f954f8util: move util/message to common/signmessage (Ryan Ofsky)cc5f29fbeabuild: move memory_cleanse from util to crypto (Ryan Ofsky)5b9309420cbuild: move chainparamsbase from util to common (Ryan Ofsky)ffa27af24dtest: 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: ACKc7376babd1TheCharlatan: Re-ACKc7376babd1hebasto: re-ACKc7376babd1. Tree-SHA512: 5bcef16c1255463b1b69270548711e7ff78ca0dd34e300b95e3ca1ce52ceb34f83d9ddb2839e83800ba36b200de30396e504bbb04fa02c6d0c24a16d06ae523d
src/node/
The src/node/ directory contains code that needs to access node state
(state in CChain, CBlockIndex, CCoinsView, CTxMemPool, and similar
classes).
Code in src/node/ is meant to be segregated from code in
src/wallet/ and src/qt/, to ensure wallet and GUI
code changes don't interfere with node operation, to allow wallet and GUI code
to run in separate processes, and to perhaps eventually allow wallet and GUI
code to be maintained in separate source repositories.
As a rule of thumb, code in one of the src/node/,
src/wallet/, or src/qt/ directories should avoid
calling code in the other directories directly, and only invoke it indirectly
through the more limited src/interfaces/ classes.
This directory is at the moment
sparsely populated. Eventually more substantial files like
src/validation.cpp and
src/txmempool.cpp might be moved there.