The docs for `blocksonly` say that "Transactions from the wallet or RPC are not affected" but the code says:

    if (gArgs.GetBoolArg("-blocksonly", DEFAULT_BLOCKSONLY) && gArgs.SoftSetBoolArg("-walletbroadcast", false)) {
        LogPrintf("%s: parameter interaction: -blocksonly=1 -> setting -walletbroadcast=0\n", __func__);
    }

Here's the relevant documentation:

    -blocksonly
       Whether to reject transactions from network peers. Transactions from the
       wallet or RPC are not affected. (default: 0)

    -walletbroadcast
       Make the wallet broadcast transactions (default: 1)

Doesn't that imply that `blocksonly` *does* affect transactions from the wallet?

pblocktree.reset();
                pblocktree.reset(new CBlockTreeDB(nBlockTreeDBCache, false, fReset));
                if (fReset) {
                    pblocktree->WriteReindexing(true);
                    
                    if (fPruneMode)
                        CleanupBlockRevFiles();
                }
                if (ShutdownRequested()) break;
                
                
                
                
                if (!LoadBlockIndex(chainparams)) {
                    if (ShutdownRequested()) break;
                    strLoadError = _("Error loading block database").translated;
                    break;
                }
                
                
                if (!::BlockIndex().empty() &&
                        !LookupBlockIndex(chainparams.GetConsensus().hashGenesisBlock)) {
                    return InitError(_("Incorrect or no genesis block found. Wrong datadir for network?").translated);
                }
                
                
                if (fHavePruned && !fPruneMode) {
                    strLoadError = _("You need to rebuild the database using -reindex to go back to unpruned mode.  This will redownload the entire blockchain").translated;