21
16
I am not a C++ pro. I read C++ as a part of my undergrad school course. I am very passionate about the future currency i.e. Bitcoin.
But I don't understand the source code structure. How to read the source code? As I already told I am have very basic knowledge of C++.
However, I can google on the way if don't understand something(functions, libraries, headers).
The actual problem I am facing is inside src/ directory. I don't understand the flow of files and directories in src/. Which is the first file that I should probably start reading. Can any one explain me all of flow of all the project in some sort of tree like structure?
~/GitHub/bitcoin/src
❯ ls ✔ master
Makefile.am coincontrol.h miner.h script
Makefile.bench.include coins.cpp net.cpp secp256k1
Makefile.qt.include coins.h net.h serialize.h
Makefile.qttest.include compat netbase.cpp streams.h
Makefile.test.include compat.h netbase.h support
addrman.cpp compressor.cpp noui.cpp sync.cpp
addrman.h compressor.h noui.h sync.h
alert.cpp config obj test
alert.h consensus obj-test threadsafety.h
amount.cpp core_io.h policy timedata.cpp
amount.h core_memusage.h pow.cpp timedata.h
arith_uint256.cpp core_read.cpp pow.h tinyformat.h
arith_uint256.h core_write.cpp prevector.h torcontrol.cpp
base58.cpp crypto primitives torcontrol.h
base58.h dbwrapper.cpp protocol.cpp txdb.cpp
bench dbwrapper.h protocol.h txdb.h
bitcoin-cli-res.rc hash.cpp pubkey.cpp txmempool.cpp
bitcoin-cli.cpp hash.h pubkey.h txmempool.h
bitcoin-tx-res.rc httprpc.cpp qt ui_interface.h
bitcoin-tx.cpp httprpc.h random.cpp uint256.cpp
bitcoind-res.rc httpserver.cpp random.h uint256.h
bitcoind.cpp httpserver.h rest.cpp undo.h
bloom.cpp init.cpp reverselock.h univalue
bloom.h init.h rpcblockchain.cpp util.cpp
chain.cpp key.cpp rpcclient.cpp util.h
chain.h key.h rpcclient.h utilmoneystr.cpp
chainparams.cpp keystore.cpp rpcmining.cpp utilmoneystr.h
chainparams.h keystore.h rpcmisc.cpp utilstrencodings.cpp
chainparamsbase.cpp leveldb rpcnet.cpp utilstrencodings.h
chainparamsbase.h limitedmap.h rpcprotocol.cpp utiltime.cpp
chainparamsseeds.h main.cpp rpcprotocol.h utiltime.h
checkpoints.cpp main.h rpcrawtransaction.cpp validationinterface.cpp
checkpoints.h memusage.h rpcserver.cpp validationinterface.h
checkqueue.h merkleblock.cpp rpcserver.h version.h
clientversion.cpp merkleblock.h scheduler.cpp wallet
clientversion.h miner.cpp scheduler.h zmq
1I think the good starting point would be take an online course in C++. Otherwise you would be reading foreign language you have no idea of. – Mikko Ohtamaa – 2015-12-07T22:07:12.543
1I am aware of C++. I am also update with C++, C++14. Its just that I never worked on a big project so I don't know the workflow. @MikkoOhtamaa would you suggest me a good resource which doesn't cover the language basics and cover the advance features of the language itself? Currently I am counting on videos posted on on channel9.msdn is that fine? – Abhimanyu Aryan – 2015-12-07T22:22:52.363
2All Microsoft sources are pretty decent what comes to advanced C++. I also suggest you getting a good IDE which does autocompletion, code insight and such that you can get around in code tree according to code flow. – Mikko Ohtamaa – 2015-12-07T22:30:35.483
Well, this is not a complete answer, but there is a lot of stuff in main.cpp to look at. I would start there. – Fraggle – 2015-12-13T21:13:35.780