diff --git a/src/interface/node.cpp b/src/interface/node.cpp index 0e6bc4a78..a8ed275dc 100644 --- a/src/interface/node.cpp +++ b/src/interface/node.cpp @@ -60,6 +60,7 @@ class NodeImpl : public Node void initLogging() override { InitLogging(); } void initParameterInteraction() override { InitParameterInteraction(); } std::string getWarnings(const std::string& type) override { return GetWarnings(type); } + uint32_t getLogCategories() override { return ::logCategories; } bool baseInitialize() override { return AppInitBasicSetup() && AppInitParameterInteraction() && AppInitSanityChecks() && @@ -227,6 +228,11 @@ class NodeImpl : public Node std::vector listRpcCommands() override { return ::tableRPC.listCommands(); } void rpcSetTimerInterfaceIfUnset(RPCTimerInterface* iface) override { RPCSetTimerInterfaceIfUnset(iface); } void rpcUnsetTimerInterface(RPCTimerInterface* iface) override { RPCUnsetTimerInterface(iface); } + bool getUnspentOutput(const COutPoint& output, Coin& coin) override + { + LOCK(::cs_main); + return ::pcoinsTip->GetCoin(output, coin); + } std::vector> getWallets() override { #ifdef ENABLE_WALLET diff --git a/src/interface/node.h b/src/interface/node.h index a31105f6f..c73f45a1b 100644 --- a/src/interface/node.h +++ b/src/interface/node.h @@ -22,6 +22,7 @@ class CCoinControl; class CFeeRate; class CNodeStats; +class Coin; class RPCTimerInterface; class UniValue; class proxyType; @@ -66,6 +67,9 @@ public: //! Get warnings. virtual std::string getWarnings(const std::string& type) = 0; + // Get log flags. + virtual uint32_t getLogCategories() = 0; + //! Initialize app dependencies. virtual bool baseInitialize() = 0; @@ -184,6 +188,9 @@ public: //! Unset RPC timer interface. virtual void rpcUnsetTimerInterface(RPCTimerInterface* iface) = 0; + //! Get unspent outputs associated with a transaction. + virtual bool getUnspentOutput(const COutPoint& output, Coin& coin) = 0; + //! Return interfaces for accessing wallets (if any). virtual std::vector> getWallets() = 0; diff --git a/src/interface/wallet.cpp b/src/interface/wallet.cpp index efc9946fb..a6bce7d3d 100644 --- a/src/interface/wallet.cpp +++ b/src/interface/wallet.cpp @@ -15,6 +15,7 @@ #include