aboutsummaryrefslogtreecommitdiff
path: root/src/node/chainstate.h
AgeCommit message (Collapse)Author
2022-07-21refactor: Fix iwyu on node/chainstateMacroFake
2022-07-19refactor: Reduce number of LoadChainstate return valuesRussell Yanofsky
2022-07-19refactor: Reduce number of LoadChainstate parametersRussell Yanofsky
2022-07-19Add missing includes to node/chainstateMacroFake
This is needed for the next commit
2022-05-18Do not pass Consensus::Params& to Chainstate helpersMacroFake
2022-05-18Do not pass time getter to Chainstate helpersMacroFake
2022-02-21Avoid implicit-integer-sign-change in VerifyLoadedChainstateMarcoFalke
2022-01-06Add src/node/* code to node:: namespaceRussell Yanofsky
2021-12-23docs: Make LoadChainstate comment more accurateCarl Dong
2021-12-07Remove all #include // for * commentsCarl Dong
2021-12-07node/chainstate: Add options for in-memory DBsCarl Dong
[META] In a future commit, these options will be used in TestingSetup to ensure that the DBs are in-memory.
2021-12-07validation: VerifyDB only needs Consensus::ParamsCarl Dong
Previously we were passing in CChainParams, when VerifyDB only needed the Consensus::Params subset.
2021-12-07node/chainstate: Decouple from ShutdownRequestedCarl Dong
...instead allow optionally passing in a std::function<bool()>
2021-12-07node/chainstate: Decouple from GetTimeCarl Dong
...instead pass in a std::function<int64_t()> Note that the static_cast is needed (apparently) for the compiler to know which overloaded GetTime to choose.
2021-12-06node/chainstate: Decouple from concept of uiInterfaceCarl Dong
...instead allow the caller to optionally pass in callbacks which are triggered for certain events. Behaviour change: The string "Verifying blocks..." was previously printed for each chainstate in chainman which did not have an effectively empty coinsview, now it will be printed once unconditionally before we call VerifyLoadedChain.
2021-12-06Split off VerifyLoadedChainstateCarl Dong
2021-12-06node/chainstate: Decouple from concept of NodeContextCarl Dong
...instead pass in only the necessary information Also allow mempool to be a nullptr
2021-12-06node/chainstate: Decouple from ArgsManagerCarl Dong
...instead pass in only the necessary information
2021-12-06node/chainstate: Decouple from stringy errorsCarl Dong
This allows us to separate the initialization code from translations and error reporting. This change changes the caller semantics of LoadChainstate quite drastically. To see that this change doesn't change behaviour, observe that: 1. Prior to this change, LoadChainstate returned false only in the "bad genesis block" failure case (by returning InitError()), indicating that the caller should immediately bail. After this change, the corresponding ERROR_BAD_GENESIS_BLOCK handler in src/init.cpp maintains behavioue by also bailing immediately. 2. The failed_* temporary booleans were only used to break out of the outer do/while(false) loop. They can therefore be safely removed.
2021-12-06node: Extract chainstate loading sequenceCarl Dong
I strongly recommend reviewing with the following git-diff flags: --color-moved=dimmed_zebra --color-moved-ws=allow-indentation-change [META] This commit is intended to be as close to a move-only commit as possible, and lingering ugliness will be resolved in subsequent commits. A few variables that are passed in by value instead of by reference deserve explanation: - fReset and fReindexChainstate are both local variables in AppInitMain and are not modified in the sequence - fPruneMode, despite being a global, is only modified in AppInitParameterInteraction, long before LoadChainstate is called ---- [META] This semantic will change in a future commit named "node/chainstate: Decouple from stringy errors"