Reject all other Blocks and allow only my own mined blocks I am looking at the source code and I want to know how a person can reject all blocks except the ones mined by himself? I want to be still able to add transaction to my blocks but reject all other mined blocks except mine, where do I need to look in the source code?
I suspect that this is an instance of the XY problem, but I'll answer anyway.

If you modify ProcessMessage so that it drops any inbound block messages, that would do it.

Change

    else if (strCommand == NetMsgType::BLOCK &amp;&amp; !fImporting &amp;&amp; !fReindex) // Ignore blocks received while importing
    {


to

    else if (false) // Ignore all blocks
    {