| 30 | } |
| 31 | |
| 32 | static void WalletCreate(CWallet* wallet_instance, uint64_t wallet_creation_flags) |
| 33 | { |
| 34 | LOCK(wallet_instance->cs_wallet); |
| 35 | |
| 36 | wallet_instance->SetMinVersion(FEATURE_LATEST); |
| 37 | wallet_instance->AddWalletFlags(wallet_creation_flags); |
| 38 | |
| 39 | if (!wallet_instance->IsWalletFlagSet(WALLET_FLAG_DESCRIPTORS)) { |
| 40 | auto spk_man = wallet_instance->GetOrCreateLegacyScriptPubKeyMan(); |
| 41 | spk_man->SetupGeneration(false); |
| 42 | } else { |
| 43 | wallet_instance->SetupDescriptorScriptPubKeyMans(); |
| 44 | } |
| 45 | |
| 46 | tfm::format(std::cout, "Topping up keypool...\n"); |
| 47 | wallet_instance->TopUpKeyPool(); |
| 48 | } |
| 49 | |
| 50 | static const std::shared_ptr<CWallet> MakeWallet(const std::string& name, const fs::path& path, const ArgsManager& args, DatabaseOptions options) |
| 51 | { |
no test coverage detected