UPSTREAM MERGE BROKEN: Merge commit 'f617e05c38' into master

This commit is contained in:
Steven Roose 2019-05-01 19:15:40 +01:00
commit 7f894ae00b
No known key found for this signature in database
GPG key ID: 2F2A88D7F8D68E87
393 changed files with 7992 additions and 3340 deletions

View file

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