https://travis-ci.org/github/bitcoin/bitcoin/jobs/679885530#L8791
for (const auto& entry : signing_provider.keys) {
        const CKey& key = entry.second;
        new_spk_man->AddDescriptorKey(key, key.GetPubKey());
    }
    
    if (!new_spk_man->TopUp()) {
        WalletLogPrintf("Could not top up scriptPubKeys\n");
        return nullptr;
    }
    
    
    if (!desc.descriptor->IsRange()) {
        auto script_pub_keys = new_spk_man->GetScriptPubKeys();
        if (script_pub_keys.empty()) {
            WalletLogPrintf("Could not generate scriptPubKeys (cache is empty)\n");
            return nullptr;
        }
        CTxDestination dest;
        if (!internal && ExtractDestination(script_pub_keys.at(0), dest)) {
            SetAddressBook(dest, label, "receive");
        }
    }
    
    auto ret = new_spk_man.get();
    m_spk_managers[new_spk_man->GetID()] = std::move(new_spk_man);
    
    ret->WriteDescriptor();
    return ret;
}