Changeset View
Changeset View
Standalone View
Standalone View
src/interfaces/node.cpp
Show All 35 Lines | |||||
#endif | #endif | ||||
#include <univalue.h> | #include <univalue.h> | ||||
#include <atomic> | #include <atomic> | ||||
class HTTPRPCRequestProcessor; | class HTTPRPCRequestProcessor; | ||||
class CWallet; | class CWallet; | ||||
fs::path GetWalletDir(); | |||||
std::vector<fs::path> ListWalletDir(); | |||||
std::vector<std::shared_ptr<CWallet>> GetWallets(); | std::vector<std::shared_ptr<CWallet>> GetWallets(); | ||||
namespace interfaces { | namespace interfaces { | ||||
class Wallet; | class Wallet; | ||||
namespace { | namespace { | ||||
▲ Show 20 Lines • Show All 186 Lines • ▼ Show 20 Lines | public: | ||||
} | } | ||||
void rpcUnsetTimerInterface(RPCTimerInterface *iface) override { | void rpcUnsetTimerInterface(RPCTimerInterface *iface) override { | ||||
RPCUnsetTimerInterface(iface); | RPCUnsetTimerInterface(iface); | ||||
} | } | ||||
bool getUnspentOutput(const COutPoint &output, Coin &coin) override { | bool getUnspentOutput(const COutPoint &output, Coin &coin) override { | ||||
LOCK(::cs_main); | LOCK(::cs_main); | ||||
return ::pcoinsTip->GetCoin(output, coin); | return ::pcoinsTip->GetCoin(output, coin); | ||||
} | } | ||||
std::string getWalletDir() override { return GetWalletDir().string(); } | |||||
std::vector<std::string> listWalletDir() override { | |||||
std::vector<std::string> paths; | |||||
for (auto &path : ListWalletDir()) { | |||||
paths.push_back(path.string()); | |||||
} | |||||
return paths; | |||||
} | |||||
std::vector<std::unique_ptr<Wallet>> getWallets() override { | std::vector<std::unique_ptr<Wallet>> getWallets() override { | ||||
std::vector<std::unique_ptr<Wallet>> wallets; | std::vector<std::unique_ptr<Wallet>> wallets; | ||||
for (const std::shared_ptr<CWallet> &wallet : GetWallets()) { | for (const std::shared_ptr<CWallet> &wallet : GetWallets()) { | ||||
wallets.emplace_back(MakeWallet(wallet)); | wallets.emplace_back(MakeWallet(wallet)); | ||||
} | } | ||||
return wallets; | return wallets; | ||||
} | } | ||||
std::unique_ptr<Handler> handleInitMessage(InitMessageFn fn) override { | std::unique_ptr<Handler> handleInitMessage(InitMessageFn fn) override { | ||||
▲ Show 20 Lines • Show All 61 Lines • Show Last 20 Lines |