Premine coins from genesis block are gone after one transaction from account/wallet
You need to do a few things to make the genesis block spendable, all in validation.cpp (untested):


Allow tx connection, L#2904:

if (*pindexPrev-&gt;phashBlock == chainparams.GetConsensus().hashGenesisBlock)
    // return true;

Skip coinbase amount check for genesis block, L#1933:

if (block.vtx[0]-&gt;GetValueOut() &gt; blockReward &amp;&amp; block.GetHash() != chainparams.GetConsensus().hashGenesisBlock)
    return state.DoS(100,
                     error("ConnectBlock(): coinbase pays too much (actual=%d vs limit=%d)", block.vtx[0]-&gt;GetValueOut(), blockReward),= REJECT_INVALID, "bad-cb-amount");

Skip writing undo data for genesis block L#1947:

if (block.GetHash() != chainparams.GetConsensus().hashGenesisBlock)
{
    if (pindex-&gt;GetUndoPos().IsNull() || !pindex-&gt;IsValid(BLOCK_VALID_SCRIPTS))
        {
            if (pindex-&gt;GetUndoPos().IsNull()) {
                CDiskBlockPos _pos;
                if (!FindUndoPos(state, pindex-&gt;nFile, _pos, ::GetSerializeSize(blockundo, SER_DISK, CLIENT_VERSION) + 40))
                    return error("ConnectBlock(): FindUndoPos failed");
                if (!UndoWriteToDisk(blockundo, _pos, pindex-&gt;pprev-&gt;GetBlockHash(), chainparams.MessageStart()))
                    return AbortNode(state, "Failed to write undo data");

                // update nUndoPos in block index
                pindex-&gt;nUndoPos = _pos.nPos;
                pindex-&gt;nStatus |= BLOCK_HAVE_UNDO;
            }

            pindex-&gt;RaiseValidity(BLOCK_VALID_SCRIPTS);
            setDirtyBlockIndex.insert(pindex);
    }
}