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:
Russell Yanofsky
2017-05-30 15:55:17 -04:00
parent 6af27b8157
commit 7e2e62cf7c
6 changed files with 98 additions and 8 deletions

View File

@@ -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