0

I was just looking through the Bitcoin code but since I am relatively new to C++ I was wondering, if anybody could tell me where the code responsible for receiving blocks that have just been mined by someone else is located.

My understanding is that when a miner successfully solves a block, it is broadcasted to the entire system. What I am looking for is the code responsible for how that broadcast is intercepted by other nodes if that makes more sense.

Thanks.

2

Look in main.cpp at the ProcessBlock function. The meat is in the AcceptBlock function in the same file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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