Welcome! This exercise is designed to help you practice key C++ programming skills specifically for Bitcoin development.
Your task is to complete the // TODO: items found in src/main.cpp and src/main.h.
- Fork this repository.
- Go to the
Actionstab and enable github workflow for your repository by clickingI understand my ...
-
Clone your fork to your local computer.
-
Explore the Code
- Open
src/main.cppandsrc/main.hand read through the function stubs. - Look for comments marked with
// TODO:— those are the spots you need to implement. - Function signatures and supporting types are declared in
src/main.h.
- Open
-
Complete the TODOs
- Implement the missing logic where indicated.
- Ensure your code is readable, idiomatic, and compiles without warnings.
-
Build and Test Your Code
- Configure the build (only needed once, or after editing
CMakeLists.txt):cmake -S . -B build - Build:
cmake --build build
- Run the tests:
./build/test_main
- Or run via
ctestfor a summary view:ctest --test-dir build --output-on-failure
- Configure the build (only needed once, or after editing
-
Commit and push your changes to the
mainbranch of your remote fork. -
Confirm your forked repository has a green check mark.
- Submit your solution to this form: Google form.
PS: You can commit and push as often as you like and GitHub Actions will re-evaluate your code every time. You will need to look through the auto-grader logs (in the "Actions" tab) to see what exactly you got right or wrong.
- Learn me a Bitcoin: link
Submissions must be your own work. Do not copy from other students or past cohorts. Sharing or copying answers is not allowed. Violations may result in your submission being invalidated or in follow-up under the program’s policies.
You may use AI tools to study and to clarify concepts, but the code you submit must be written by you. Do not paste in AI-generated answers as your submission. The exercises are for your learning; relying on AI to produce answers will undermine that and may be treated like other academic misconduct.
These rules are in place so that you actually practice and learn C++, build real skills, and can be fairly assessed. Doing the work yourself is how you learn; shortcuts defeat the purpose of the exercises and don’t prepare you for what comes next in the program.

