What does the main.cpp source-code file do? I know what main.cpp files are for in general, but specifically in the case of bitcoin?

closed as too broad by Nick ODell Apr 2 '15 at 19:47

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • I think this is a very, very wide question best answered perhaps by an issue filed on the Bitcoin issue tracker asking for inline documentation on the functions and methods in this file. It's not a very good question to be answered in this forum. – Colin Dean Dec 13 '12 at 20:07
  • 2
    It's totally NOT a "wide question", it's very specific instead. Either we accept source-code questions, or we don't; if we do, then this question is perfectly valid. – o0'. Dec 14 '12 at 19:04

It just contains an apparently random collection of functions used by the program. It also declares some global structures such as the main lock, the transaction pool, orphan block tracking, and so on. It contains high-level block and transaction functions. Ironically, it does not contain the actual main function -- that's in init.cpp.

Not the answer you're looking for? Browse other questions tagged or ask your own question.