mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
Add skeleton chain and client classes
This commit does not change behavior. It just adds new skeleton classes that don't do anything and aren't instantiated yet.
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
#include <amount.h>
|
||||
#include <chain.h>
|
||||
#include <consensus/validation.h>
|
||||
#include <interfaces/chain.h>
|
||||
#include <interfaces/handler.h>
|
||||
#include <net.h>
|
||||
#include <policy/feerate.h>
|
||||
@@ -20,11 +21,17 @@
|
||||
#include <timedata.h>
|
||||
#include <ui_interface.h>
|
||||
#include <uint256.h>
|
||||
#include <util/system.h>
|
||||
#include <validation.h>
|
||||
#include <wallet/feebumper.h>
|
||||
#include <wallet/fees.h>
|
||||
#include <wallet/wallet.h>
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
namespace interfaces {
|
||||
namespace {
|
||||
|
||||
@@ -456,8 +463,25 @@ public:
|
||||
CWallet& m_wallet;
|
||||
};
|
||||
|
||||
class WalletClientImpl : public ChainClient
|
||||
{
|
||||
public:
|
||||
WalletClientImpl(Chain& chain, std::vector<std::string> wallet_filenames)
|
||||
: m_chain(chain), m_wallet_filenames(std::move(wallet_filenames))
|
||||
{
|
||||
}
|
||||
|
||||
Chain& m_chain;
|
||||
std::vector<std::string> m_wallet_filenames;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
||||
std::unique_ptr<Wallet> MakeWallet(const std::shared_ptr<CWallet>& wallet) { return MakeUnique<WalletImpl>(wallet); }
|
||||
|
||||
std::unique_ptr<ChainClient> MakeWalletClient(Chain& chain, std::vector<std::string> wallet_filenames)
|
||||
{
|
||||
return MakeUnique<WalletClientImpl>(chain, std::move(wallet_filenames));
|
||||
}
|
||||
|
||||
} // namespace interfaces
|
||||
|
||||
Reference in New Issue
Block a user