bitcoin/src/node
Carl Dong f329a9298c scripted-diff: Move src/kernel/coinstats to kernel::
Introduces a new kernel:: namespace and move all of src/kernel/coinstats
under it.

In the verify script, lines like:

line="$(grep -n 'namespace node {' -- src/kernel/coinstats.h | tail -n1 | cut -d: -f1)"
sed -i -e "${line}s@namespace node {@namespace kernel {@" -- src/kernel/coinstats.h

Are intended to replace only the last instance of "namespace node" with
"namespace kernel", this is to avoid replacing forward declarations of
things inside the node:: namespace.

-BEGIN VERIFY SCRIPT-
sed -E -i 's@namespace node@namespace kernel@g' -- src/kernel/coinstats.cpp

line="$(grep -n 'namespace node {' -- src/kernel/coinstats.h | tail -n1 | cut -d: -f1)"
sed -i -e "${line}s@namespace node {@namespace kernel {@" -- src/kernel/coinstats.h

line="$(grep -n '// namespace node' -- src/kernel/coinstats.h | tail -n1 | cut -d: -f1)"
sed -i -e "${line}s@// namespace node@// namespace kernel@" -- src/kernel/coinstats.h

things='(CCoinsStats|CoinStatsHashType|GetBogoSize|TxOutSer|ComputeUTXOStats)'
git grep -lE 'node::'"$things" | xargs sed -E -i 's@node::'"$things"'@kernel::\1@g'
sed -E -i 's@'"$things"'@kernel::\1@g' -- src/node/coinstats.cpp src/node/coinstats.h
sed -E -i 's@BlockManager@node::\0@g' -- src/kernel/coinstats.cpp
-END VERIFY SCRIPT-
2022-05-23 14:53:35 -04:00
..
blockstorage.cpp blockstorage, refactor: pass GetFirstStoredBlock() start_block by reference 2022-04-28 20:42:08 +02:00
blockstorage.h blockstorage: add LIFETIMEBOUND to GetFirstStoredBlock()::start_time 2022-05-03 22:20:31 +02:00
caches.cpp Add src/node/* code to node:: namespace 2022-01-06 22:14:16 -05:00
caches.h Add src/node/* code to node:: namespace 2022-01-06 22:14:16 -05:00
chainstate.cpp Do not pass Consensus::Params& to Chainstate helpers 2022-05-18 18:45:30 +02:00
chainstate.h Do not pass Consensus::Params& to Chainstate helpers 2022-05-18 18:45:30 +02:00
coin.cpp Add src/node/* code to node:: namespace 2022-01-06 22:14:16 -05:00
coin.h Add src/node/* code to node:: namespace 2022-01-06 22:14:16 -05:00
coinstats.cpp scripted-diff: Move src/kernel/coinstats to kernel:: 2022-05-23 14:53:35 -04:00
coinstats.h scripted-diff: Move src/kernel/coinstats to kernel:: 2022-05-23 14:53:35 -04:00
context.cpp refactor: use C++11 default initializers 2022-05-17 17:18:58 +01:00
context.h [init] Add netgroupman to node.context 2022-04-19 10:25:40 +01:00
interfaces.cpp Merge bitcoin/bitcoin#25168: refactor: Avoid passing params where not needed 2022-05-20 13:35:15 +01:00
miner.cpp Add ChainstateManager::m_adjusted_time_callback 2022-05-20 11:57:51 -04:00
miner.h Do not pass CChainParams& to BlockAssembler constructor 2022-05-18 18:46:07 +02:00
minisketchwrapper.cpp Add src/node/* code to node:: namespace 2022-01-06 22:14:16 -05:00
minisketchwrapper.h Add src/node/* code to node:: namespace 2022-01-06 22:14:16 -05:00
psbt.cpp Add src/node/* code to node:: namespace 2022-01-06 22:14:16 -05:00
psbt.h Add src/node/* code to node:: namespace 2022-01-06 22:14:16 -05:00
README.md doc: Remove irrelevant link to GitHub 2021-04-06 09:34:21 +02:00
transaction.cpp Add src/node/* code to node:: namespace 2022-01-06 22:14:16 -05:00
transaction.h Add src/node/* code to node:: namespace 2022-01-06 22:14:16 -05:00
ui_interface.cpp scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
ui_interface.h refactor: Make MessageBoxFlags enum underlying type unsigned 2022-01-31 09:27:12 +01:00
utxo_snapshot.h Add src/node/* code to node:: namespace 2022-01-06 22:14:16 -05:00

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.