Block Broadcasting - Unsolicited Block Push Can someone, please, direct me to the source code section(s) relevant for an Unsolicited Block Push as described in the Bitcoin Developer Guide?

I've been going through main.cpp and searched for the term MSG_BLOCK, serving as a beagle for finding the correct place in the code. But as I'm reading further, it seems to me as if a freshly mined block is not appended to a inventory message, with MSG_BLOCK, in order to send it as a "package" as response to a request (GetData Response) BUT is sent as a single message of this structure:



To me, up to now, the best canditate for Unsolicited Block Push seems to be main.cpp#L2393 part of main.cpp but I'm confused since I don't know if there is more of possibly relevant code (like main.cpp#L3830) for Unsolicited Block Push in /src/.

So: In a first step, I'm looking for code that is relevant for broadcasting a newly found block. Can someone please help?
We can find all instances in the code where the client will send a block message by searching for PushMessage("block". This is the only match:

void static ProcessGetData(CNode* pfrom)
{
[...]
    pfrom-&gt;PushMessage("block", block);


(Source.)

This means that the standard client only ever sends a block message when specifically asked for it. That incoming getdata message is probably triggered in turn by sending the remote node an inv message. (Though that's not necessary - you can ask for a block that the other node hasn't advertised.) This is the code that sends inventory messages:

//
// Message: inventory
//
vector&lt;CInv&gt; vInv;
vector&lt;CInv&gt; vInvWait;
{
    LOCK(pto-&gt;cs_inventory);
    vInv.reserve(pto-&gt;vInventoryToSend.size());
    vInvWait.reserve(pto-&gt;vInventoryToSend.size());
    BOOST_FOREACH(const CInv&amp; inv, pto-&gt;vInventoryToSend)
    {
        // If the other node already knows the message, don't send
        if (pto-&gt;setInventoryKnown.count(inv))
            continue;

        // trickle out tx inv to protect privacy
        [...]

        // returns true if remote node hasn't seen it
        if (pto-&gt;setInventoryKnown.insert(inv).second)
        {
            // Add to the list of inventory messages to send
            vInv.push_back(inv);
            // If there's 1000 inventory messages queued up, send them
            // (Protocol limit is 50000 at a time.)
            if (vInv.size() &gt;= 1000)
            {
                pto-&gt;PushMessage("inv", vInv);
                vInv.clear();
            }
        }
    }
    pto-&gt;vInventoryToSend = vInvWait;
}
// Send any that are left over.
if (!vInv.empty())
    pto-&gt;PushMessage("inv", vInv);


(Source.)

(pto represents the remote node in the above code.)

So the page you're looking at describes a behavior that you could implement, and that other clients will accept, but it doesn't describe the current core client behavior.