Change type of backup_file parameter in RestoreWallet/restoreWallet

`fs::path` looks more native than `std::string` for a parameter which
represents a backup file. This change eliminates back-and-forth type
conversions.
This commit is contained in:
Hennadii Stepanov
2022-01-10 23:55:31 +02:00
parent 213172c734
commit 3a45dc36a6
5 changed files with 9 additions and 7 deletions

View File

@@ -6,6 +6,7 @@
#define BITCOIN_INTERFACES_WALLET_H
#include <consensus/amount.h>
#include <fs.h>
#include <interfaces/chain.h> // For ChainClient
#include <pubkey.h> // For CKeyID and CScriptID (definitions needed in CTxDestination instantiation)
#include <script/standard.h> // For CTxDestination
@@ -326,7 +327,7 @@ public:
virtual std::string getWalletDir() = 0;
//! Restore backup wallet
virtual std::unique_ptr<Wallet> restoreWallet(const std::string& backup_file, const std::string& wallet_name, bilingual_str& error, std::vector<bilingual_str>& warnings) = 0;
virtual std::unique_ptr<Wallet> restoreWallet(const fs::path& backup_file, const std::string& wallet_name, bilingual_str& error, std::vector<bilingual_str>& warnings) = 0;
//! Return available wallets in wallet directory.
virtual std::vector<std::string> listWalletDir() = 0;