Where is the code that receives blocks that miners have just solved

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.

Cheese

Posted 2014-03-23T01:33:18.413

Reputation: 61

Answers

2

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

David Schwartz

Posted 2014-03-23T01:33:18.413

Reputation: 46 931