mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
UPSTREAM MERGE BROKEN: Merge commit 'f617e05c38' into master
This commit is contained in:
commit
7f894ae00b
393 changed files with 7992 additions and 3340 deletions
|
|
@ -9,6 +9,7 @@
|
|||
#include <chain.h>
|
||||
#include <chainparams.h>
|
||||
#include <init.h>
|
||||
#include <interfaces/chain.h>
|
||||
#include <interfaces/handler.h>
|
||||
#include <interfaces/wallet.h>
|
||||
#include <net.h>
|
||||
|
|
@ -25,7 +26,7 @@
|
|||
#include <sync.h>
|
||||
#include <txmempool.h>
|
||||
#include <ui_interface.h>
|
||||
#include <util.h>
|
||||
#include <util/system.h>
|
||||
#include <validation.h>
|
||||
#include <warnings.h>
|
||||
|
||||
|
|
@ -38,6 +39,8 @@
|
|||
#include <univalue.h>
|
||||
|
||||
class CWallet;
|
||||
fs::path GetWalletDir();
|
||||
std::vector<fs::path> ListWalletDir();
|
||||
std::vector<std::shared_ptr<CWallet>> GetWallets();
|
||||
|
||||
namespace interfaces {
|
||||
|
|
@ -48,6 +51,8 @@ namespace {
|
|||
|
||||
class NodeImpl : public Node
|
||||
{
|
||||
public:
|
||||
NodeImpl() { m_interfaces.chain = MakeChain(); }
|
||||
bool parseParameters(int argc, const char* const argv[], std::string& error) override
|
||||
{
|
||||
return gArgs.ParseParameters(argc, argv, error);
|
||||
|
|
@ -66,11 +71,11 @@ class NodeImpl : public Node
|
|||
return AppInitBasicSetup() && AppInitParameterInteraction() && AppInitSanityChecks() &&
|
||||
AppInitLockDataDirectory();
|
||||
}
|
||||
bool appInitMain() override { return AppInitMain(); }
|
||||
bool appInitMain() override { return AppInitMain(m_interfaces); }
|
||||
void appShutdown() override
|
||||
{
|
||||
Interrupt();
|
||||
Shutdown();
|
||||
Shutdown(m_interfaces);
|
||||
}
|
||||
void startShutdown() override { StartShutdown(); }
|
||||
bool shutdownRequested() override { return ShutdownRequested(); }
|
||||
|
|
@ -218,6 +223,18 @@ class NodeImpl : public Node
|
|||
LOCK(::cs_main);
|
||||
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>> wallets;
|
||||
|
|
@ -277,6 +294,7 @@ class NodeImpl : public Node
|
|||
GuessVerificationProgress(block, Params().GetConsensus().nPowTargetSpacing));
|
||||
}));
|
||||
}
|
||||
InitInterfaces m_interfaces;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue