0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-02-10 10:52:31 -05:00
bitcoin-bitcoin-core/src/node
MarcoFalke 3917dff732
Merge bitcoin/bitcoin#23855: refactor: Post-"Chainstate loading sequence coalescence" fixups
e3544c864e init: Use clang-tidy named args syntax (Carl Dong)
3401630417 style-only: Rename *Chainstate return values (Carl Dong)
1dd582782d docs: Make LoadChainstate comment more accurate (Carl Dong)
6b83576388 node/chainstate: Use MAX_FUTURE_BLOCK_TIME (Carl Dong)

Pull request description:

  There are 2 proposed fixups in discussions in #23280 which I have not implemented:

  1. An overhaul to return types and an option type for the two `*Chainstate` functions: https://github.com/bitcoin/bitcoin/pull/23280#issuecomment-984149564
      - The change reintroduces stringy return types and is quite involved. It could be discussed in a separate PR.
  2. Passing in the unix time to `VerifyChainstate` instead of a callback to get the time: https://github.com/bitcoin/bitcoin/pull/23280#discussion_r765051533
      - I'm not sure it matters much whether it's a callback or just the actual unix time. Also, I think `VerifyDB` can take quite a while, and I don't want to impose that the function have to "run quickly" in order to have it be correct.

  If reviewers feel strongly about either of the two fixups listed above, please feel free to open a PR based on mine and I'll close this one!

ACKs for top commit:
  ryanofsky:
    Code review ACK e3544c864e
  MarcoFalke:
    ACK e3544c864e 🐸

Tree-SHA512: dd1de0265b6785eef306e724b678ce03d7c54ea9f4b5ea0ccd7af59cce2ea3aba73fd4af0c15e2dca9265807dc4075f9afa2ec103672677b6638b1a4fc090904
2022-01-06 13:55:53 +01:00
..
blockstorage.cpp doc: Fix typo in LoadBlockIndex 2022-01-05 10:41:16 -03:00
blockstorage.h Fixup style of moved code 2022-01-02 17:05:22 +01:00
caches.cpp node/caches: Remove intermediate variables 2021-12-07 14:48:49 -05:00
caches.h Remove all #include // for * comments 2021-12-07 14:48:49 -05:00
chainstate.cpp node/chainstate: Use MAX_FUTURE_BLOCK_TIME 2021-12-23 17:13:36 -05:00
chainstate.h docs: Make LoadChainstate comment more accurate 2021-12-23 17:20:46 -05:00
coin.cpp scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
coin.h node: Use mempool from node context instead of global 2019-12-05 14:22:05 -05:00
coinstats.cpp Merge bitcoin/bitcoin#23411: refactor: Avoid integer overflow in ApplyStats when activating snapshot 2022-01-05 10:34:29 +01:00
coinstats.h Merge bitcoin/bitcoin#23411: refactor: Avoid integer overflow in ApplyStats when activating snapshot 2022-01-05 10:34:29 +01:00
context.cpp validation: Farewell, global Chainstate! 2021-06-10 15:05:25 -04:00
context.h scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
interfaces.cpp scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
miner.cpp scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
miner.h scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
minisketchwrapper.cpp scripted-diff: Move minisketchwrapper to src/node 2021-11-12 10:56:08 +01:00
minisketchwrapper.h Sort file list after rename 2021-11-12 10:56:27 +01:00
psbt.cpp scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
psbt.h scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
README.md doc: Remove irrelevant link to GitHub 2021-04-06 09:34:21 +02:00
transaction.cpp scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
transaction.h scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
ui_interface.cpp scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
ui_interface.h scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
utxo_snapshot.h scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02: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.