As per my understanding of bitcoin codebase, the following events happen after we solve a proof of work.
- In
miner.cpp
, once the miner thread solves a new Proof-of-work (PoW),ProcessBlockFound
basically notifies others via a signalBlockFound
. BlockFound
signal callsResetRequestCount
which basically resets thempRequestCount
inwallet.h
via thevalidationInterface.h
.- (Missing Logic)
- A new
NetMsgType::INV
is issued frommain.cpp
inSendMessages
/ProcessMessages
to all peers. - These messages are eventually dispatched to all peers via network socket logic
net.cpp
I am missing the main piece of code logic between step2 and step4. Can any expert help me understand what background story is happening after step2?