/ src / node / README.md
README.md
 1  # src/node/
 2  
 3  The [`src/node/`](./) directory contains code that needs to access node state
 4  (state in `CChain`, `CBlockIndex`, `CCoinsView`, `CTxMemPool`, and similar
 5  classes).
 6  
 7  Code in [`src/node/`](./) is meant to be segregated from code in
 8  [`src/wallet/`](../wallet/) and [`src/qt/`](../qt/), to ensure wallet and GUI
 9  code changes don't interfere with node operation, to allow wallet and GUI code
10  to run in separate processes, and to perhaps eventually allow wallet and GUI
11  code to be maintained in separate source repositories.
12  
13  As a rule of thumb, code in one of the [`src/node/`](./),
14  [`src/wallet/`](../wallet/), or [`src/qt/`](../qt/) directories should avoid
15  calling code in the other directories directly, and only invoke it indirectly
16  through the more limited [`src/interfaces/`](../interfaces/) classes.
17  
18  This directory is at the moment
19  sparsely populated. Eventually more substantial files like
20  [`src/validation.cpp`](../validation.cpp) and
21  [`src/txmempool.cpp`](../txmempool.cpp) might be moved there.