https://travis-ci.org/github/bitcoin/bitcoin/jobs/679885530#L8791
{
    AssertLockHeld(cs_wallet);
    if (!IsWalletFlagSet(WALLET_FLAG_EXTERNAL_SIGNER)) {
        
        CKey seed_key;
        seed_key.MakeNewKey(true);
        CPubKey seed = seed_key.GetPubKey();
        assert(seed_key.VerifyPubKey(seed));
        
        CExtKey master_key;
        master_key.SetSeed(seed_key.begin(), seed_key.size());
        for (bool internal : {false, true}) {
            for (OutputType t : OUTPUT_TYPES) {
                auto spk_manager = std::unique_ptr<DescriptorScriptPubKeyMan>(new DescriptorScriptPubKeyMan(*this, internal));
                if (IsCrypted()) {
                    if (IsLocked()) {
                        throw std::runtime_error(std::string(__func__) + ": Wallet is locked, cannot setup new descriptors");
                    }
                    if (!spk_manager->CheckDecryptionKey(vMasterKey) && !spk_manager->Encrypt(vMasterKey, nullptr)) {
                        throw std::runtime_error(std::string(__func__) + ": Could not encrypt new descriptors");
                    }
                }
                spk_manager->SetupDescriptorGeneration(master_key, t);
                uint256 id = spk_manager->GetID();
                m_spk_managers[id] = std::move(spk_manager);
                AddActiveScriptPubKeyMan(id, t, internal);
            }
        }
    } else {
#ifdef ENABLE_EXTERNAL_SIGNER