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?

break;
                }
                
                ::ChainstateActive().InitCoinsCache();
                assert(::ChainstateActive().CanFlushToDisk());
                is_coinsview_empty = fReset || fReindexChainState ||
                    ::ChainstateActive().CoinsTip().GetBestBlock().IsNull();
                if (!is_coinsview_empty) {
                    
                    if (!::ChainstateActive().LoadChainTip(chainparams)) {
                        strLoadError = _("Error initializing block database").translated;
                        break;
                    }
                    assert(::ChainActive().Tip() != nullptr);
                }
            } catch (const std::exception& e) {
                LogPrintf("%s\n", e.what());
                strLoadError = _("Error opening block database").translated;
                break;
            }
            if (!fReset) {
                
                
                
                uiInterface.InitMessage(_("Rewinding blocks...").translated);
                if (!RewindBlockIndex(chainparams)) {
                    strLoadError = _("Unable to rewind the database to a pre-fork state. You will need to redownload the blockchain").translated;
                    break;
                }
            }