Merge #12906: Avoid interface
keyword to fix windows gitian build
17780d6f35
scripted-diff: Avoid `interface` keyword to fix windows gitian build (Russell Yanofsky)
Pull request description:
Rename `interface` to `interfaces`
Build failure reported by ken2812221 in https://github.com/bitcoin/bitcoin/pull/10244#issuecomment-379434756
Tree-SHA512: e02c97c728540f344202c13b036f9f63af23bd25e25ed7a5cfe9e2c2f201a12ff232cc94a93fbe37ef6fb6bf9e036fe62210ba798ecd30de191d09338754a8d0
This commit is contained in:
commit
048ac8326b
57 changed files with 211 additions and 211 deletions
|
@ -623,7 +623,7 @@ GUI
|
||||||
holds: try to not directly access core data structures from Views.
|
holds: try to not directly access core data structures from Views.
|
||||||
|
|
||||||
- Avoid adding slow or blocking code in the GUI thread. In particular do not
|
- Avoid adding slow or blocking code in the GUI thread. In particular do not
|
||||||
add new `interface::Node` and `interface::Wallet` method calls, even if they
|
add new `interfaces::Node` and `interfaces::Wallet` method calls, even if they
|
||||||
may be fast now, in case they are changed to lock or communicate across
|
may be fast now, in case they are changed to lock or communicate across
|
||||||
processes in the future.
|
processes in the future.
|
||||||
|
|
||||||
|
|
|
@ -105,9 +105,9 @@ BITCOIN_CORE_H = \
|
||||||
httpserver.h \
|
httpserver.h \
|
||||||
indirectmap.h \
|
indirectmap.h \
|
||||||
init.h \
|
init.h \
|
||||||
interface/handler.h \
|
interfaces/handler.h \
|
||||||
interface/node.h \
|
interfaces/node.h \
|
||||||
interface/wallet.h \
|
interfaces/wallet.h \
|
||||||
key.h \
|
key.h \
|
||||||
key_io.h \
|
key_io.h \
|
||||||
keystore.h \
|
keystore.h \
|
||||||
|
@ -248,7 +248,7 @@ endif
|
||||||
libbitcoin_wallet_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
|
libbitcoin_wallet_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
|
||||||
libbitcoin_wallet_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
|
libbitcoin_wallet_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
|
||||||
libbitcoin_wallet_a_SOURCES = \
|
libbitcoin_wallet_a_SOURCES = \
|
||||||
interface/wallet.cpp \
|
interfaces/wallet.cpp \
|
||||||
wallet/crypter.cpp \
|
wallet/crypter.cpp \
|
||||||
wallet/db.cpp \
|
wallet/db.cpp \
|
||||||
wallet/feebumper.cpp \
|
wallet/feebumper.cpp \
|
||||||
|
@ -361,8 +361,8 @@ libbitcoin_util_a_SOURCES = \
|
||||||
compat/glibcxx_sanity.cpp \
|
compat/glibcxx_sanity.cpp \
|
||||||
compat/strnlen.cpp \
|
compat/strnlen.cpp \
|
||||||
fs.cpp \
|
fs.cpp \
|
||||||
interface/handler.cpp \
|
interfaces/handler.cpp \
|
||||||
interface/node.cpp \
|
interfaces/node.cpp \
|
||||||
random.cpp \
|
random.cpp \
|
||||||
rpc/protocol.cpp \
|
rpc/protocol.cpp \
|
||||||
rpc/util.cpp \
|
rpc/util.cpp \
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// Distributed under the MIT software license, see the accompanying
|
// Distributed under the MIT software license, see the accompanying
|
||||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||||
|
|
||||||
#include <interface/handler.h>
|
#include <interfaces/handler.h>
|
||||||
|
|
||||||
#include <util.h>
|
#include <util.h>
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
namespace interface {
|
namespace interfaces {
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
class HandlerImpl : public Handler
|
class HandlerImpl : public Handler
|
||||||
|
@ -30,4 +30,4 @@ std::unique_ptr<Handler> MakeHandler(boost::signals2::connection connection)
|
||||||
return MakeUnique<HandlerImpl>(std::move(connection));
|
return MakeUnique<HandlerImpl>(std::move(connection));
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace interface
|
} // namespace interfaces
|
|
@ -2,8 +2,8 @@
|
||||||
// Distributed under the MIT software license, see the accompanying
|
// Distributed under the MIT software license, see the accompanying
|
||||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||||
|
|
||||||
#ifndef BITCOIN_INTERFACE_HANDLER_H
|
#ifndef BITCOIN_INTERFACES_HANDLER_H
|
||||||
#define BITCOIN_INTERFACE_HANDLER_H
|
#define BITCOIN_INTERFACES_HANDLER_H
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ class connection;
|
||||||
} // namespace signals2
|
} // namespace signals2
|
||||||
} // namespace boost
|
} // namespace boost
|
||||||
|
|
||||||
namespace interface {
|
namespace interfaces {
|
||||||
|
|
||||||
//! Generic interface for managing an event handler or callback function
|
//! Generic interface for managing an event handler or callback function
|
||||||
//! registered with another interface. Has a single disconnect method to cancel
|
//! registered with another interface. Has a single disconnect method to cancel
|
||||||
|
@ -30,6 +30,6 @@ public:
|
||||||
//! Return handler wrapping a boost signal connection.
|
//! Return handler wrapping a boost signal connection.
|
||||||
std::unique_ptr<Handler> MakeHandler(boost::signals2::connection connection);
|
std::unique_ptr<Handler> MakeHandler(boost::signals2::connection connection);
|
||||||
|
|
||||||
} // namespace interface
|
} // namespace interfaces
|
||||||
|
|
||||||
#endif // BITCOIN_INTERFACE_HANDLER_H
|
#endif // BITCOIN_INTERFACES_HANDLER_H
|
|
@ -2,15 +2,15 @@
|
||||||
// Distributed under the MIT software license, see the accompanying
|
// Distributed under the MIT software license, see the accompanying
|
||||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||||
|
|
||||||
#include <interface/node.h>
|
#include <interfaces/node.h>
|
||||||
|
|
||||||
#include <addrdb.h>
|
#include <addrdb.h>
|
||||||
#include <amount.h>
|
#include <amount.h>
|
||||||
#include <chain.h>
|
#include <chain.h>
|
||||||
#include <chainparams.h>
|
#include <chainparams.h>
|
||||||
#include <init.h>
|
#include <init.h>
|
||||||
#include <interface/handler.h>
|
#include <interfaces/handler.h>
|
||||||
#include <interface/wallet.h>
|
#include <interfaces/wallet.h>
|
||||||
#include <net.h>
|
#include <net.h>
|
||||||
#include <net_processing.h>
|
#include <net_processing.h>
|
||||||
#include <netaddress.h>
|
#include <netaddress.h>
|
||||||
|
@ -43,7 +43,7 @@
|
||||||
#include <boost/thread/thread.hpp>
|
#include <boost/thread/thread.hpp>
|
||||||
#include <univalue.h>
|
#include <univalue.h>
|
||||||
|
|
||||||
namespace interface {
|
namespace interfaces {
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
class NodeImpl : public Node
|
class NodeImpl : public Node
|
||||||
|
@ -305,4 +305,4 @@ class NodeImpl : public Node
|
||||||
|
|
||||||
std::unique_ptr<Node> MakeNode() { return MakeUnique<NodeImpl>(); }
|
std::unique_ptr<Node> MakeNode() { return MakeUnique<NodeImpl>(); }
|
||||||
|
|
||||||
} // namespace interface
|
} // namespace interfaces
|
|
@ -2,8 +2,8 @@
|
||||||
// Distributed under the MIT software license, see the accompanying
|
// Distributed under the MIT software license, see the accompanying
|
||||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||||
|
|
||||||
#ifndef BITCOIN_INTERFACE_NODE_H
|
#ifndef BITCOIN_INTERFACES_NODE_H
|
||||||
#define BITCOIN_INTERFACE_NODE_H
|
#define BITCOIN_INTERFACES_NODE_H
|
||||||
|
|
||||||
#include <addrdb.h> // For banmap_t
|
#include <addrdb.h> // For banmap_t
|
||||||
#include <amount.h> // For CAmount
|
#include <amount.h> // For CAmount
|
||||||
|
@ -29,7 +29,7 @@ class proxyType;
|
||||||
enum class FeeReason;
|
enum class FeeReason;
|
||||||
struct CNodeStateStats;
|
struct CNodeStateStats;
|
||||||
|
|
||||||
namespace interface {
|
namespace interfaces {
|
||||||
|
|
||||||
class Handler;
|
class Handler;
|
||||||
class Wallet;
|
class Wallet;
|
||||||
|
@ -254,6 +254,6 @@ public:
|
||||||
//! Return implementation of Node interface.
|
//! Return implementation of Node interface.
|
||||||
std::unique_ptr<Node> MakeNode();
|
std::unique_ptr<Node> MakeNode();
|
||||||
|
|
||||||
} // namespace interface
|
} // namespace interfaces
|
||||||
|
|
||||||
#endif // BITCOIN_INTERFACE_NODE_H
|
#endif // BITCOIN_INTERFACES_NODE_H
|
|
@ -2,12 +2,12 @@
|
||||||
// Distributed under the MIT software license, see the accompanying
|
// Distributed under the MIT software license, see the accompanying
|
||||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||||
|
|
||||||
#include <interface/wallet.h>
|
#include <interfaces/wallet.h>
|
||||||
|
|
||||||
#include <amount.h>
|
#include <amount.h>
|
||||||
#include <chain.h>
|
#include <chain.h>
|
||||||
#include <consensus/validation.h>
|
#include <consensus/validation.h>
|
||||||
#include <interface/handler.h>
|
#include <interfaces/handler.h>
|
||||||
#include <net.h>
|
#include <net.h>
|
||||||
#include <policy/policy.h>
|
#include <policy/policy.h>
|
||||||
#include <primitives/transaction.h>
|
#include <primitives/transaction.h>
|
||||||
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
namespace interface {
|
namespace interfaces {
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
class PendingWalletTxImpl : public PendingWalletTx
|
class PendingWalletTxImpl : public PendingWalletTx
|
||||||
|
@ -283,7 +283,7 @@ public:
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
bool tryGetTxStatus(const uint256& txid,
|
bool tryGetTxStatus(const uint256& txid,
|
||||||
interface::WalletTxStatus& tx_status,
|
interfaces::WalletTxStatus& tx_status,
|
||||||
int& num_blocks,
|
int& num_blocks,
|
||||||
int64_t& adjusted_time) override
|
int64_t& adjusted_time) override
|
||||||
{
|
{
|
||||||
|
@ -438,4 +438,4 @@ public:
|
||||||
|
|
||||||
std::unique_ptr<Wallet> MakeWallet(CWallet& wallet) { return MakeUnique<WalletImpl>(wallet); }
|
std::unique_ptr<Wallet> MakeWallet(CWallet& wallet) { return MakeUnique<WalletImpl>(wallet); }
|
||||||
|
|
||||||
} // namespace interface
|
} // namespace interfaces
|
|
@ -2,8 +2,8 @@
|
||||||
// Distributed under the MIT software license, see the accompanying
|
// Distributed under the MIT software license, see the accompanying
|
||||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||||
|
|
||||||
#ifndef BITCOIN_INTERFACE_WALLET_H
|
#ifndef BITCOIN_INTERFACES_WALLET_H
|
||||||
#define BITCOIN_INTERFACE_WALLET_H
|
#define BITCOIN_INTERFACES_WALLET_H
|
||||||
|
|
||||||
#include <amount.h> // For CAmount
|
#include <amount.h> // For CAmount
|
||||||
#include <pubkey.h> // For CTxDestination (CKeyID and CScriptID)
|
#include <pubkey.h> // For CTxDestination (CKeyID and CScriptID)
|
||||||
|
@ -27,7 +27,7 @@ class CWallet;
|
||||||
enum class OutputType;
|
enum class OutputType;
|
||||||
struct CRecipient;
|
struct CRecipient;
|
||||||
|
|
||||||
namespace interface {
|
namespace interfaces {
|
||||||
|
|
||||||
class Handler;
|
class Handler;
|
||||||
class PendingWalletTx;
|
class PendingWalletTx;
|
||||||
|
@ -347,6 +347,6 @@ struct WalletTxOut
|
||||||
//! in builds where ENABLE_WALLET is false.
|
//! in builds where ENABLE_WALLET is false.
|
||||||
std::unique_ptr<Wallet> MakeWallet(CWallet& wallet);
|
std::unique_ptr<Wallet> MakeWallet(CWallet& wallet);
|
||||||
|
|
||||||
} // namespace interface
|
} // namespace interfaces
|
||||||
|
|
||||||
#endif // BITCOIN_INTERFACE_WALLET_H
|
#endif // BITCOIN_INTERFACES_WALLET_H
|
|
@ -7,7 +7,7 @@
|
||||||
#include <qt/guiutil.h>
|
#include <qt/guiutil.h>
|
||||||
#include <qt/walletmodel.h>
|
#include <qt/walletmodel.h>
|
||||||
|
|
||||||
#include <interface/node.h>
|
#include <interfaces/node.h>
|
||||||
#include <key_io.h>
|
#include <key_io.h>
|
||||||
#include <wallet/wallet.h>
|
#include <wallet/wallet.h>
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ public:
|
||||||
AddressTablePriv(AddressTableModel *_parent):
|
AddressTablePriv(AddressTableModel *_parent):
|
||||||
parent(_parent) {}
|
parent(_parent) {}
|
||||||
|
|
||||||
void refreshAddressTable(interface::Wallet& wallet)
|
void refreshAddressTable(interfaces::Wallet& wallet)
|
||||||
{
|
{
|
||||||
cachedAddressTable.clear();
|
cachedAddressTable.clear();
|
||||||
{
|
{
|
||||||
|
|
|
@ -13,7 +13,7 @@ enum class OutputType;
|
||||||
class AddressTablePriv;
|
class AddressTablePriv;
|
||||||
class WalletModel;
|
class WalletModel;
|
||||||
|
|
||||||
namespace interface {
|
namespace interfaces {
|
||||||
class Wallet;
|
class Wallet;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
#include <qt/guiconstants.h>
|
#include <qt/guiconstants.h>
|
||||||
#include <qt/guiutil.h>
|
#include <qt/guiutil.h>
|
||||||
|
|
||||||
#include <interface/node.h>
|
#include <interfaces/node.h>
|
||||||
#include <sync.h>
|
#include <sync.h>
|
||||||
#include <utiltime.h>
|
#include <utiltime.h>
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ public:
|
||||||
Qt::SortOrder sortOrder;
|
Qt::SortOrder sortOrder;
|
||||||
|
|
||||||
/** Pull a full list of banned nodes from CNode into our cache */
|
/** Pull a full list of banned nodes from CNode into our cache */
|
||||||
void refreshBanlist(interface::Node& node)
|
void refreshBanlist(interfaces::Node& node)
|
||||||
{
|
{
|
||||||
banmap_t banMap;
|
banmap_t banMap;
|
||||||
node.getBanned(banMap);
|
node.getBanned(banMap);
|
||||||
|
@ -82,7 +82,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
BanTableModel::BanTableModel(interface::Node& node, ClientModel *parent) :
|
BanTableModel::BanTableModel(interfaces::Node& node, ClientModel *parent) :
|
||||||
QAbstractTableModel(parent),
|
QAbstractTableModel(parent),
|
||||||
m_node(node),
|
m_node(node),
|
||||||
clientModel(parent)
|
clientModel(parent)
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
class ClientModel;
|
class ClientModel;
|
||||||
class BanTablePriv;
|
class BanTablePriv;
|
||||||
|
|
||||||
namespace interface {
|
namespace interfaces {
|
||||||
class Node;
|
class Node;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ class BanTableModel : public QAbstractTableModel
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit BanTableModel(interface::Node& node, ClientModel *parent = 0);
|
explicit BanTableModel(interfaces::Node& node, ClientModel *parent = 0);
|
||||||
~BanTableModel();
|
~BanTableModel();
|
||||||
void startAutoRefresh();
|
void startAutoRefresh();
|
||||||
void stopAutoRefresh();
|
void stopAutoRefresh();
|
||||||
|
@ -71,7 +71,7 @@ public Q_SLOTS:
|
||||||
void refresh();
|
void refresh();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
interface::Node& m_node;
|
interfaces::Node& m_node;
|
||||||
ClientModel *clientModel;
|
ClientModel *clientModel;
|
||||||
QStringList columns;
|
QStringList columns;
|
||||||
std::unique_ptr<BanTablePriv> priv;
|
std::unique_ptr<BanTablePriv> priv;
|
||||||
|
|
|
@ -27,8 +27,8 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <init.h>
|
#include <init.h>
|
||||||
#include <interface/handler.h>
|
#include <interfaces/handler.h>
|
||||||
#include <interface/node.h>
|
#include <interfaces/node.h>
|
||||||
#include <rpc/server.h>
|
#include <rpc/server.h>
|
||||||
#include <ui_interface.h>
|
#include <ui_interface.h>
|
||||||
#include <uint256.h>
|
#include <uint256.h>
|
||||||
|
@ -179,7 +179,7 @@ class BitcoinCore: public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit BitcoinCore(interface::Node& node);
|
explicit BitcoinCore(interfaces::Node& node);
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
void initialize();
|
void initialize();
|
||||||
|
@ -194,7 +194,7 @@ private:
|
||||||
/// Pass fatal exception message to UI thread
|
/// Pass fatal exception message to UI thread
|
||||||
void handleRunawayException(const std::exception *e);
|
void handleRunawayException(const std::exception *e);
|
||||||
|
|
||||||
interface::Node& m_node;
|
interfaces::Node& m_node;
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Main Bitcoin application object */
|
/** Main Bitcoin application object */
|
||||||
|
@ -202,7 +202,7 @@ class BitcoinApplication: public QApplication
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit BitcoinApplication(interface::Node& node, int &argc, char **argv);
|
explicit BitcoinApplication(interfaces::Node& node, int &argc, char **argv);
|
||||||
~BitcoinApplication();
|
~BitcoinApplication();
|
||||||
|
|
||||||
#ifdef ENABLE_WALLET
|
#ifdef ENABLE_WALLET
|
||||||
|
@ -243,7 +243,7 @@ Q_SIGNALS:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QThread *coreThread;
|
QThread *coreThread;
|
||||||
interface::Node& m_node;
|
interfaces::Node& m_node;
|
||||||
OptionsModel *optionsModel;
|
OptionsModel *optionsModel;
|
||||||
ClientModel *clientModel;
|
ClientModel *clientModel;
|
||||||
BitcoinGUI *window;
|
BitcoinGUI *window;
|
||||||
|
@ -261,7 +261,7 @@ private:
|
||||||
|
|
||||||
#include <qt/bitcoin.moc>
|
#include <qt/bitcoin.moc>
|
||||||
|
|
||||||
BitcoinCore::BitcoinCore(interface::Node& node) :
|
BitcoinCore::BitcoinCore(interfaces::Node& node) :
|
||||||
QObject(), m_node(node)
|
QObject(), m_node(node)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -301,7 +301,7 @@ void BitcoinCore::shutdown()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
BitcoinApplication::BitcoinApplication(interface::Node& node, int &argc, char **argv):
|
BitcoinApplication::BitcoinApplication(interfaces::Node& node, int &argc, char **argv):
|
||||||
QApplication(argc, argv),
|
QApplication(argc, argv),
|
||||||
coreThread(0),
|
coreThread(0),
|
||||||
m_node(node),
|
m_node(node),
|
||||||
|
@ -532,7 +532,7 @@ int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
SetupEnvironment();
|
SetupEnvironment();
|
||||||
|
|
||||||
std::unique_ptr<interface::Node> node = interface::MakeNode();
|
std::unique_ptr<interfaces::Node> node = interfaces::MakeNode();
|
||||||
|
|
||||||
/// 1. Parse command-line options. These take precedence over anything else.
|
/// 1. Parse command-line options. These take precedence over anything else.
|
||||||
// Command-line options take precedence:
|
// Command-line options take precedence:
|
||||||
|
@ -679,7 +679,7 @@ int main(int argc, char *argv[])
|
||||||
app.createOptionsModel(gArgs.GetBoolArg("-resetguisettings", false));
|
app.createOptionsModel(gArgs.GetBoolArg("-resetguisettings", false));
|
||||||
|
|
||||||
// Subscribe to global signals from core
|
// Subscribe to global signals from core
|
||||||
std::unique_ptr<interface::Handler> handler = node->handleInitMessage(InitMessage);
|
std::unique_ptr<interfaces::Handler> handler = node->handleInitMessage(InitMessage);
|
||||||
|
|
||||||
if (gArgs.GetBoolArg("-splash", DEFAULT_SPLASHSCREEN) && !gArgs.GetBoolArg("-min", false))
|
if (gArgs.GetBoolArg("-splash", DEFAULT_SPLASHSCREEN) && !gArgs.GetBoolArg("-min", false))
|
||||||
app.createSplashScreen(networkStyle.data());
|
app.createSplashScreen(networkStyle.data());
|
||||||
|
|
|
@ -30,8 +30,8 @@
|
||||||
|
|
||||||
#include <chainparams.h>
|
#include <chainparams.h>
|
||||||
#include <init.h>
|
#include <init.h>
|
||||||
#include <interface/handler.h>
|
#include <interfaces/handler.h>
|
||||||
#include <interface/node.h>
|
#include <interfaces/node.h>
|
||||||
#include <ui_interface.h>
|
#include <ui_interface.h>
|
||||||
#include <util.h>
|
#include <util.h>
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ const std::string BitcoinGUI::DEFAULT_UIPLATFORM =
|
||||||
#endif
|
#endif
|
||||||
;
|
;
|
||||||
|
|
||||||
BitcoinGUI::BitcoinGUI(interface::Node& node, const PlatformStyle *_platformStyle, const NetworkStyle *networkStyle, QWidget *parent) :
|
BitcoinGUI::BitcoinGUI(interfaces::Node& node, const PlatformStyle *_platformStyle, const NetworkStyle *networkStyle, QWidget *parent) :
|
||||||
QMainWindow(parent),
|
QMainWindow(parent),
|
||||||
enableWallet(false),
|
enableWallet(false),
|
||||||
m_node(node),
|
m_node(node),
|
||||||
|
|
|
@ -33,7 +33,7 @@ class WalletModel;
|
||||||
class HelpMessageDialog;
|
class HelpMessageDialog;
|
||||||
class ModalOverlay;
|
class ModalOverlay;
|
||||||
|
|
||||||
namespace interface {
|
namespace interfaces {
|
||||||
class Handler;
|
class Handler;
|
||||||
class Node;
|
class Node;
|
||||||
}
|
}
|
||||||
|
@ -56,7 +56,7 @@ class BitcoinGUI : public QMainWindow
|
||||||
public:
|
public:
|
||||||
static const std::string DEFAULT_UIPLATFORM;
|
static const std::string DEFAULT_UIPLATFORM;
|
||||||
|
|
||||||
explicit BitcoinGUI(interface::Node& node, const PlatformStyle *platformStyle, const NetworkStyle *networkStyle, QWidget *parent = 0);
|
explicit BitcoinGUI(interfaces::Node& node, const PlatformStyle *platformStyle, const NetworkStyle *networkStyle, QWidget *parent = 0);
|
||||||
~BitcoinGUI();
|
~BitcoinGUI();
|
||||||
|
|
||||||
/** Set the client model.
|
/** Set the client model.
|
||||||
|
@ -83,9 +83,9 @@ protected:
|
||||||
bool eventFilter(QObject *object, QEvent *event);
|
bool eventFilter(QObject *object, QEvent *event);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
interface::Node& m_node;
|
interfaces::Node& m_node;
|
||||||
std::unique_ptr<interface::Handler> m_handler_message_box;
|
std::unique_ptr<interfaces::Handler> m_handler_message_box;
|
||||||
std::unique_ptr<interface::Handler> m_handler_question;
|
std::unique_ptr<interfaces::Handler> m_handler_question;
|
||||||
ClientModel *clientModel;
|
ClientModel *clientModel;
|
||||||
WalletFrame *walletFrame;
|
WalletFrame *walletFrame;
|
||||||
|
|
||||||
|
|
|
@ -13,8 +13,8 @@
|
||||||
#include <chainparams.h>
|
#include <chainparams.h>
|
||||||
#include <checkpoints.h>
|
#include <checkpoints.h>
|
||||||
#include <clientversion.h>
|
#include <clientversion.h>
|
||||||
#include <interface/handler.h>
|
#include <interfaces/handler.h>
|
||||||
#include <interface/node.h>
|
#include <interfaces/node.h>
|
||||||
#include <validation.h>
|
#include <validation.h>
|
||||||
#include <net.h>
|
#include <net.h>
|
||||||
#include <txmempool.h>
|
#include <txmempool.h>
|
||||||
|
@ -32,7 +32,7 @@ class CBlockIndex;
|
||||||
static int64_t nLastHeaderTipUpdateNotification = 0;
|
static int64_t nLastHeaderTipUpdateNotification = 0;
|
||||||
static int64_t nLastBlockTipUpdateNotification = 0;
|
static int64_t nLastBlockTipUpdateNotification = 0;
|
||||||
|
|
||||||
ClientModel::ClientModel(interface::Node& node, OptionsModel *_optionsModel, QObject *parent) :
|
ClientModel::ClientModel(interfaces::Node& node, OptionsModel *_optionsModel, QObject *parent) :
|
||||||
QObject(parent),
|
QObject(parent),
|
||||||
m_node(node),
|
m_node(node),
|
||||||
optionsModel(_optionsModel),
|
optionsModel(_optionsModel),
|
||||||
|
|
|
@ -17,7 +17,7 @@ class PeerTableModel;
|
||||||
|
|
||||||
class CBlockIndex;
|
class CBlockIndex;
|
||||||
|
|
||||||
namespace interface {
|
namespace interfaces {
|
||||||
class Handler;
|
class Handler;
|
||||||
class Node;
|
class Node;
|
||||||
}
|
}
|
||||||
|
@ -46,10 +46,10 @@ class ClientModel : public QObject
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit ClientModel(interface::Node& node, OptionsModel *optionsModel, QObject *parent = 0);
|
explicit ClientModel(interfaces::Node& node, OptionsModel *optionsModel, QObject *parent = 0);
|
||||||
~ClientModel();
|
~ClientModel();
|
||||||
|
|
||||||
interface::Node& node() const { return m_node; }
|
interfaces::Node& node() const { return m_node; }
|
||||||
OptionsModel *getOptionsModel();
|
OptionsModel *getOptionsModel();
|
||||||
PeerTableModel *getPeerTableModel();
|
PeerTableModel *getPeerTableModel();
|
||||||
BanTableModel *getBanTableModel();
|
BanTableModel *getBanTableModel();
|
||||||
|
@ -75,14 +75,14 @@ public:
|
||||||
mutable std::atomic<int64_t> cachedBestHeaderTime;
|
mutable std::atomic<int64_t> cachedBestHeaderTime;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
interface::Node& m_node;
|
interfaces::Node& m_node;
|
||||||
std::unique_ptr<interface::Handler> m_handler_show_progress;
|
std::unique_ptr<interfaces::Handler> m_handler_show_progress;
|
||||||
std::unique_ptr<interface::Handler> m_handler_notify_num_connections_changed;
|
std::unique_ptr<interfaces::Handler> m_handler_notify_num_connections_changed;
|
||||||
std::unique_ptr<interface::Handler> m_handler_notify_network_active_changed;
|
std::unique_ptr<interfaces::Handler> m_handler_notify_network_active_changed;
|
||||||
std::unique_ptr<interface::Handler> m_handler_notify_alert_changed;
|
std::unique_ptr<interfaces::Handler> m_handler_notify_alert_changed;
|
||||||
std::unique_ptr<interface::Handler> m_handler_banned_list_changed;
|
std::unique_ptr<interfaces::Handler> m_handler_banned_list_changed;
|
||||||
std::unique_ptr<interface::Handler> m_handler_notify_block_tip;
|
std::unique_ptr<interfaces::Handler> m_handler_notify_block_tip;
|
||||||
std::unique_ptr<interface::Handler> m_handler_notify_header_tip;
|
std::unique_ptr<interfaces::Handler> m_handler_notify_header_tip;
|
||||||
OptionsModel *optionsModel;
|
OptionsModel *optionsModel;
|
||||||
PeerTableModel *peerTableModel;
|
PeerTableModel *peerTableModel;
|
||||||
BanTableModel *banTableModel;
|
BanTableModel *banTableModel;
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
#include <qt/walletmodel.h>
|
#include <qt/walletmodel.h>
|
||||||
|
|
||||||
#include <wallet/coincontrol.h>
|
#include <wallet/coincontrol.h>
|
||||||
#include <interface/node.h>
|
#include <interfaces/node.h>
|
||||||
#include <key_io.h>
|
#include <key_io.h>
|
||||||
#include <policy/fees.h>
|
#include <policy/fees.h>
|
||||||
#include <policy/policy.h>
|
#include <policy/policy.h>
|
||||||
|
@ -648,7 +648,7 @@ void CoinControlDialog::updateView()
|
||||||
int nChildren = 0;
|
int nChildren = 0;
|
||||||
for (const auto& outpair : coins.second) {
|
for (const auto& outpair : coins.second) {
|
||||||
const COutPoint& output = std::get<0>(outpair);
|
const COutPoint& output = std::get<0>(outpair);
|
||||||
const interface::WalletTxOut& out = std::get<1>(outpair);
|
const interfaces::WalletTxOut& out = std::get<1>(outpair);
|
||||||
nSum += out.txout.nValue;
|
nSum += out.txout.nValue;
|
||||||
nChildren++;
|
nChildren++;
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
#include <chainparams.h>
|
#include <chainparams.h>
|
||||||
#include <primitives/transaction.h>
|
#include <primitives/transaction.h>
|
||||||
#include <key_io.h>
|
#include <key_io.h>
|
||||||
#include <interface/node.h>
|
#include <interfaces/node.h>
|
||||||
#include <policy/policy.h>
|
#include <policy/policy.h>
|
||||||
#include <protocol.h>
|
#include <protocol.h>
|
||||||
#include <script/script.h>
|
#include <script/script.h>
|
||||||
|
@ -232,7 +232,7 @@ QString formatBitcoinURI(const SendCoinsRecipient &info)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isDust(interface::Node& node, const QString& address, const CAmount& amount)
|
bool isDust(interfaces::Node& node, const QString& address, const CAmount& amount)
|
||||||
{
|
{
|
||||||
CTxDestination dest = DecodeDestination(address.toStdString());
|
CTxDestination dest = DecodeDestination(address.toStdString());
|
||||||
CScript script = GetScriptForDestination(dest);
|
CScript script = GetScriptForDestination(dest);
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
class QValidatedLineEdit;
|
class QValidatedLineEdit;
|
||||||
class SendCoinsRecipient;
|
class SendCoinsRecipient;
|
||||||
|
|
||||||
namespace interface
|
namespace interfaces
|
||||||
{
|
{
|
||||||
class Node;
|
class Node;
|
||||||
}
|
}
|
||||||
|
@ -54,7 +54,7 @@ namespace GUIUtil
|
||||||
QString formatBitcoinURI(const SendCoinsRecipient &info);
|
QString formatBitcoinURI(const SendCoinsRecipient &info);
|
||||||
|
|
||||||
// Returns true if given address+amount meets "dust" definition
|
// Returns true if given address+amount meets "dust" definition
|
||||||
bool isDust(interface::Node& node, const QString& address, const CAmount& amount);
|
bool isDust(interfaces::Node& node, const QString& address, const CAmount& amount);
|
||||||
|
|
||||||
// HTML escaping for rich text controls
|
// HTML escaping for rich text controls
|
||||||
QString HtmlEscape(const QString& str, bool fMultiLine=false);
|
QString HtmlEscape(const QString& str, bool fMultiLine=false);
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
#include <qt/guiutil.h>
|
#include <qt/guiutil.h>
|
||||||
|
|
||||||
#include <interface/node.h>
|
#include <interfaces/node.h>
|
||||||
#include <util.h>
|
#include <util.h>
|
||||||
|
|
||||||
#include <QFileDialog>
|
#include <QFileDialog>
|
||||||
|
@ -187,7 +187,7 @@ QString Intro::getDefaultDataDirectory()
|
||||||
return GUIUtil::boostPathToQString(GetDefaultDataDir());
|
return GUIUtil::boostPathToQString(GetDefaultDataDir());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Intro::pickDataDirectory(interface::Node& node)
|
bool Intro::pickDataDirectory(interfaces::Node& node)
|
||||||
{
|
{
|
||||||
QSettings settings;
|
QSettings settings;
|
||||||
/* If data directory provided on command line, no need to look at settings
|
/* If data directory provided on command line, no need to look at settings
|
||||||
|
|
|
@ -13,7 +13,7 @@ static const bool DEFAULT_CHOOSE_DATADIR = false;
|
||||||
|
|
||||||
class FreespaceChecker;
|
class FreespaceChecker;
|
||||||
|
|
||||||
namespace interface {
|
namespace interfaces {
|
||||||
class Node;
|
class Node;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ public:
|
||||||
* @note do NOT call global GetDataDir() before calling this function, this
|
* @note do NOT call global GetDataDir() before calling this function, this
|
||||||
* will cause the wrong path to be cached.
|
* will cause the wrong path to be cached.
|
||||||
*/
|
*/
|
||||||
static bool pickDataDirectory(interface::Node& node);
|
static bool pickDataDirectory(interfaces::Node& node);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determine default data directory for operating system.
|
* Determine default data directory for operating system.
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
#include <qt/guiutil.h>
|
#include <qt/guiutil.h>
|
||||||
#include <qt/optionsmodel.h>
|
#include <qt/optionsmodel.h>
|
||||||
|
|
||||||
#include <interface/node.h>
|
#include <interfaces/node.h>
|
||||||
#include <validation.h> // for DEFAULT_SCRIPTCHECK_THREADS and MAX_SCRIPTCHECK_THREADS
|
#include <validation.h> // for DEFAULT_SCRIPTCHECK_THREADS and MAX_SCRIPTCHECK_THREADS
|
||||||
#include <netbase.h>
|
#include <netbase.h>
|
||||||
#include <txdb.h> // for -dbcache defaults
|
#include <txdb.h> // for -dbcache defaults
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
#include <qt/bitcoinunits.h>
|
#include <qt/bitcoinunits.h>
|
||||||
#include <qt/guiutil.h>
|
#include <qt/guiutil.h>
|
||||||
|
|
||||||
#include <interface/node.h>
|
#include <interfaces/node.h>
|
||||||
#include <validation.h> // For DEFAULT_SCRIPTCHECK_THREADS
|
#include <validation.h> // For DEFAULT_SCRIPTCHECK_THREADS
|
||||||
#include <net.h>
|
#include <net.h>
|
||||||
#include <netbase.h>
|
#include <netbase.h>
|
||||||
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
const char *DEFAULT_GUI_PROXY_HOST = "127.0.0.1";
|
const char *DEFAULT_GUI_PROXY_HOST = "127.0.0.1";
|
||||||
|
|
||||||
OptionsModel::OptionsModel(interface::Node& node, QObject *parent, bool resetSettings) :
|
OptionsModel::OptionsModel(interfaces::Node& node, QObject *parent, bool resetSettings) :
|
||||||
QAbstractListModel(parent), m_node(node)
|
QAbstractListModel(parent), m_node(node)
|
||||||
{
|
{
|
||||||
Init(resetSettings);
|
Init(resetSettings);
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
#include <QAbstractListModel>
|
#include <QAbstractListModel>
|
||||||
|
|
||||||
namespace interface {
|
namespace interfaces {
|
||||||
class Node;
|
class Node;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ class OptionsModel : public QAbstractListModel
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit OptionsModel(interface::Node& node, QObject *parent = 0, bool resetSettings = false);
|
explicit OptionsModel(interfaces::Node& node, QObject *parent = 0, bool resetSettings = false);
|
||||||
|
|
||||||
enum OptionID {
|
enum OptionID {
|
||||||
StartAtStartup, // bool
|
StartAtStartup, // bool
|
||||||
|
@ -79,10 +79,10 @@ public:
|
||||||
void setRestartRequired(bool fRequired);
|
void setRestartRequired(bool fRequired);
|
||||||
bool isRestartRequired() const;
|
bool isRestartRequired() const;
|
||||||
|
|
||||||
interface::Node& node() const { return m_node; }
|
interfaces::Node& node() const { return m_node; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
interface::Node& m_node;
|
interfaces::Node& m_node;
|
||||||
/* Qt-only settings */
|
/* Qt-only settings */
|
||||||
bool fHideTrayIcon;
|
bool fHideTrayIcon;
|
||||||
bool fMinimizeToTray;
|
bool fMinimizeToTray;
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#define DECORATION_SIZE 54
|
#define DECORATION_SIZE 54
|
||||||
#define NUM_ITEMS 5
|
#define NUM_ITEMS 5
|
||||||
|
|
||||||
Q_DECLARE_METATYPE(interface::WalletBalances)
|
Q_DECLARE_METATYPE(interfaces::WalletBalances)
|
||||||
|
|
||||||
class TxViewDelegate : public QAbstractItemDelegate
|
class TxViewDelegate : public QAbstractItemDelegate
|
||||||
{
|
{
|
||||||
|
@ -157,7 +157,7 @@ OverviewPage::~OverviewPage()
|
||||||
delete ui;
|
delete ui;
|
||||||
}
|
}
|
||||||
|
|
||||||
void OverviewPage::setBalance(const interface::WalletBalances& balances)
|
void OverviewPage::setBalance(const interfaces::WalletBalances& balances)
|
||||||
{
|
{
|
||||||
int unit = walletModel->getOptionsModel()->getDisplayUnit();
|
int unit = walletModel->getOptionsModel()->getDisplayUnit();
|
||||||
m_balances = balances;
|
m_balances = balances;
|
||||||
|
@ -224,10 +224,10 @@ void OverviewPage::setWalletModel(WalletModel *model)
|
||||||
ui->listTransactions->setModelColumn(TransactionTableModel::ToAddress);
|
ui->listTransactions->setModelColumn(TransactionTableModel::ToAddress);
|
||||||
|
|
||||||
// Keep up to date with wallet
|
// Keep up to date with wallet
|
||||||
interface::Wallet& wallet = model->wallet();
|
interfaces::Wallet& wallet = model->wallet();
|
||||||
interface::WalletBalances balances = wallet.getBalances();
|
interfaces::WalletBalances balances = wallet.getBalances();
|
||||||
setBalance(balances);
|
setBalance(balances);
|
||||||
connect(model, SIGNAL(balanceChanged(interface::WalletBalances)), this, SLOT(setBalance(interface::WalletBalances)));
|
connect(model, SIGNAL(balanceChanged(interfaces::WalletBalances)), this, SLOT(setBalance(interfaces::WalletBalances)));
|
||||||
|
|
||||||
connect(model->getOptionsModel(), SIGNAL(displayUnitChanged(int)), this, SLOT(updateDisplayUnit()));
|
connect(model->getOptionsModel(), SIGNAL(displayUnitChanged(int)), this, SLOT(updateDisplayUnit()));
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
#ifndef BITCOIN_QT_OVERVIEWPAGE_H
|
#ifndef BITCOIN_QT_OVERVIEWPAGE_H
|
||||||
#define BITCOIN_QT_OVERVIEWPAGE_H
|
#define BITCOIN_QT_OVERVIEWPAGE_H
|
||||||
|
|
||||||
#include <interface/wallet.h>
|
#include <interfaces/wallet.h>
|
||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
@ -38,7 +38,7 @@ public:
|
||||||
void showOutOfSyncWarning(bool fShow);
|
void showOutOfSyncWarning(bool fShow);
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
void setBalance(const interface::WalletBalances& balances);
|
void setBalance(const interfaces::WalletBalances& balances);
|
||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
void transactionClicked(const QModelIndex &index);
|
void transactionClicked(const QModelIndex &index);
|
||||||
|
@ -48,7 +48,7 @@ private:
|
||||||
Ui::OverviewPage *ui;
|
Ui::OverviewPage *ui;
|
||||||
ClientModel *clientModel;
|
ClientModel *clientModel;
|
||||||
WalletModel *walletModel;
|
WalletModel *walletModel;
|
||||||
interface::WalletBalances m_balances;
|
interfaces::WalletBalances m_balances;
|
||||||
|
|
||||||
TxViewDelegate *txdelegate;
|
TxViewDelegate *txdelegate;
|
||||||
std::unique_ptr<TransactionFilterProxy> filter;
|
std::unique_ptr<TransactionFilterProxy> filter;
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
#include <qt/optionsmodel.h>
|
#include <qt/optionsmodel.h>
|
||||||
|
|
||||||
#include <chainparams.h>
|
#include <chainparams.h>
|
||||||
#include <interface/node.h>
|
#include <interfaces/node.h>
|
||||||
#include <policy/policy.h>
|
#include <policy/policy.h>
|
||||||
#include <key_io.h>
|
#include <key_io.h>
|
||||||
#include <ui_interface.h>
|
#include <ui_interface.h>
|
||||||
|
@ -201,7 +201,7 @@ void PaymentServer::LoadRootCAs(X509_STORE* _store)
|
||||||
// Warning: ipcSendCommandLine() is called early in init,
|
// Warning: ipcSendCommandLine() is called early in init,
|
||||||
// so don't use "Q_EMIT message()", but "QMessageBox::"!
|
// so don't use "Q_EMIT message()", but "QMessageBox::"!
|
||||||
//
|
//
|
||||||
void PaymentServer::ipcParseCommandLine(interface::Node& node, int argc, char* argv[])
|
void PaymentServer::ipcParseCommandLine(interfaces::Node& node, int argc, char* argv[])
|
||||||
{
|
{
|
||||||
for (int i = 1; i < argc; i++)
|
for (int i = 1; i < argc; i++)
|
||||||
{
|
{
|
||||||
|
@ -760,7 +760,7 @@ void PaymentServer::handlePaymentACK(const QString& paymentACKMsg)
|
||||||
Q_EMIT message(tr("Payment acknowledged"), paymentACKMsg, CClientUIInterface::ICON_INFORMATION | CClientUIInterface::MODAL);
|
Q_EMIT message(tr("Payment acknowledged"), paymentACKMsg, CClientUIInterface::ICON_INFORMATION | CClientUIInterface::MODAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PaymentServer::verifyNetwork(interface::Node& node, const payments::PaymentDetails& requestDetails)
|
bool PaymentServer::verifyNetwork(interfaces::Node& node, const payments::PaymentDetails& requestDetails)
|
||||||
{
|
{
|
||||||
bool fVerified = requestDetails.network() == node.getNetwork();
|
bool fVerified = requestDetails.network() == node.getNetwork();
|
||||||
if (!fVerified) {
|
if (!fVerified) {
|
||||||
|
|
|
@ -60,7 +60,7 @@ class PaymentServer : public QObject
|
||||||
public:
|
public:
|
||||||
// Parse URIs on command line
|
// Parse URIs on command line
|
||||||
// Returns false on error
|
// Returns false on error
|
||||||
static void ipcParseCommandLine(interface::Node& node, int argc, char *argv[]);
|
static void ipcParseCommandLine(interfaces::Node& node, int argc, char *argv[]);
|
||||||
|
|
||||||
// Returns true if there were URIs on the command line
|
// Returns true if there were URIs on the command line
|
||||||
// which were successfully sent to an already-running
|
// which were successfully sent to an already-running
|
||||||
|
@ -87,7 +87,7 @@ public:
|
||||||
void setOptionsModel(OptionsModel *optionsModel);
|
void setOptionsModel(OptionsModel *optionsModel);
|
||||||
|
|
||||||
// Verify that the payment request network matches the client network
|
// Verify that the payment request network matches the client network
|
||||||
static bool verifyNetwork(interface::Node& node, const payments::PaymentDetails& requestDetails);
|
static bool verifyNetwork(interfaces::Node& node, const payments::PaymentDetails& requestDetails);
|
||||||
// Verify if the payment request is expired
|
// Verify if the payment request is expired
|
||||||
static bool verifyExpired(const payments::PaymentDetails& requestDetails);
|
static bool verifyExpired(const payments::PaymentDetails& requestDetails);
|
||||||
// Verify the payment request size is valid as per BIP70
|
// Verify the payment request size is valid as per BIP70
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
#include <qt/guiconstants.h>
|
#include <qt/guiconstants.h>
|
||||||
#include <qt/guiutil.h>
|
#include <qt/guiutil.h>
|
||||||
|
|
||||||
#include <interface/node.h>
|
#include <interfaces/node.h>
|
||||||
#include <validation.h> // for cs_main
|
#include <validation.h> // for cs_main
|
||||||
#include <sync.h>
|
#include <sync.h>
|
||||||
|
|
||||||
|
@ -57,12 +57,12 @@ public:
|
||||||
std::map<NodeId, int> mapNodeRows;
|
std::map<NodeId, int> mapNodeRows;
|
||||||
|
|
||||||
/** Pull a full list of peers from vNodes into our cache */
|
/** Pull a full list of peers from vNodes into our cache */
|
||||||
void refreshPeers(interface::Node& node)
|
void refreshPeers(interfaces::Node& node)
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
cachedNodeStats.clear();
|
cachedNodeStats.clear();
|
||||||
|
|
||||||
interface::Node::NodesStats nodes_stats;
|
interfaces::Node::NodesStats nodes_stats;
|
||||||
node.getNodesStats(nodes_stats);
|
node.getNodesStats(nodes_stats);
|
||||||
#if QT_VERSION >= 0x040700
|
#if QT_VERSION >= 0x040700
|
||||||
cachedNodeStats.reserve(nodes_stats.size());
|
cachedNodeStats.reserve(nodes_stats.size());
|
||||||
|
@ -102,7 +102,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
PeerTableModel::PeerTableModel(interface::Node& node, ClientModel *parent) :
|
PeerTableModel::PeerTableModel(interfaces::Node& node, ClientModel *parent) :
|
||||||
QAbstractTableModel(parent),
|
QAbstractTableModel(parent),
|
||||||
m_node(node),
|
m_node(node),
|
||||||
clientModel(parent),
|
clientModel(parent),
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
class ClientModel;
|
class ClientModel;
|
||||||
class PeerTablePriv;
|
class PeerTablePriv;
|
||||||
|
|
||||||
namespace interface {
|
namespace interfaces {
|
||||||
class Node;
|
class Node;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@ class PeerTableModel : public QAbstractTableModel
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit PeerTableModel(interface::Node& node, ClientModel *parent = 0);
|
explicit PeerTableModel(interfaces::Node& node, ClientModel *parent = 0);
|
||||||
~PeerTableModel();
|
~PeerTableModel();
|
||||||
const CNodeCombinedStats *getNodeStats(int idx);
|
const CNodeCombinedStats *getNodeStats(int idx);
|
||||||
int getRowByNodeId(NodeId nodeid);
|
int getRowByNodeId(NodeId nodeid);
|
||||||
|
@ -82,7 +82,7 @@ public Q_SLOTS:
|
||||||
void refresh();
|
void refresh();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
interface::Node& m_node;
|
interfaces::Node& m_node;
|
||||||
ClientModel *clientModel;
|
ClientModel *clientModel;
|
||||||
QStringList columns;
|
QStringList columns;
|
||||||
std::unique_ptr<PeerTablePriv> priv;
|
std::unique_ptr<PeerTablePriv> priv;
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
#include <qt/platformstyle.h>
|
#include <qt/platformstyle.h>
|
||||||
#include <qt/walletmodel.h>
|
#include <qt/walletmodel.h>
|
||||||
#include <chainparams.h>
|
#include <chainparams.h>
|
||||||
#include <interface/node.h>
|
#include <interfaces/node.h>
|
||||||
#include <netbase.h>
|
#include <netbase.h>
|
||||||
#include <rpc/server.h>
|
#include <rpc/server.h>
|
||||||
#include <rpc/client.h>
|
#include <rpc/client.h>
|
||||||
|
@ -85,7 +85,7 @@ class RPCExecutor : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
RPCExecutor(interface::Node& node) : m_node(node) {}
|
RPCExecutor(interfaces::Node& node) : m_node(node) {}
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
void request(const QString &command, const QString &walletID);
|
void request(const QString &command, const QString &walletID);
|
||||||
|
@ -94,7 +94,7 @@ Q_SIGNALS:
|
||||||
void reply(int category, const QString &command);
|
void reply(int category, const QString &command);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
interface::Node& m_node;
|
interfaces::Node& m_node;
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Class for handling RPC timers
|
/** Class for handling RPC timers
|
||||||
|
@ -153,7 +153,7 @@ public:
|
||||||
* @param[out] pstrFilteredOut Command line, filtered to remove any sensitive data
|
* @param[out] pstrFilteredOut Command line, filtered to remove any sensitive data
|
||||||
*/
|
*/
|
||||||
|
|
||||||
bool RPCConsole::RPCParseCommandLine(interface::Node* node, std::string &strResult, const std::string &strCommand, const bool fExecute, std::string * const pstrFilteredOut, const std::string *walletID)
|
bool RPCConsole::RPCParseCommandLine(interfaces::Node* node, std::string &strResult, const std::string &strCommand, const bool fExecute, std::string * const pstrFilteredOut, const std::string *walletID)
|
||||||
{
|
{
|
||||||
std::vector< std::vector<std::string> > stack;
|
std::vector< std::vector<std::string> > stack;
|
||||||
stack.push_back(std::vector<std::string>());
|
stack.push_back(std::vector<std::string>());
|
||||||
|
@ -451,7 +451,7 @@ void RPCExecutor::request(const QString &command, const QString &walletID)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RPCConsole::RPCConsole(interface::Node& node, const PlatformStyle *_platformStyle, QWidget *parent) :
|
RPCConsole::RPCConsole(interfaces::Node& node, const PlatformStyle *_platformStyle, QWidget *parent) :
|
||||||
QWidget(parent),
|
QWidget(parent),
|
||||||
m_node(node),
|
m_node(node),
|
||||||
ui(new Ui::RPCConsole),
|
ui(new Ui::RPCConsole),
|
||||||
|
@ -575,7 +575,7 @@ void RPCConsole::setClientModel(ClientModel *model)
|
||||||
setNumConnections(model->getNumConnections());
|
setNumConnections(model->getNumConnections());
|
||||||
connect(model, SIGNAL(numConnectionsChanged(int)), this, SLOT(setNumConnections(int)));
|
connect(model, SIGNAL(numConnectionsChanged(int)), this, SLOT(setNumConnections(int)));
|
||||||
|
|
||||||
interface::Node& node = clientModel->node();
|
interfaces::Node& node = clientModel->node();
|
||||||
setNumBlocks(node.getNumBlocks(), QDateTime::fromTime_t(node.getLastBlockTime()), node.getVerificationProgress(), false);
|
setNumBlocks(node.getNumBlocks(), QDateTime::fromTime_t(node.getLastBlockTime()), node.getVerificationProgress(), false);
|
||||||
connect(model, SIGNAL(numBlocksChanged(int,QDateTime,double,bool)), this, SLOT(setNumBlocks(int,QDateTime,double,bool)));
|
connect(model, SIGNAL(numBlocksChanged(int,QDateTime,double,bool)), this, SLOT(setNumBlocks(int,QDateTime,double,bool)));
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ class PlatformStyle;
|
||||||
class RPCTimerInterface;
|
class RPCTimerInterface;
|
||||||
class WalletModel;
|
class WalletModel;
|
||||||
|
|
||||||
namespace interface {
|
namespace interfaces {
|
||||||
class Node;
|
class Node;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,11 +38,11 @@ class RPCConsole: public QWidget
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit RPCConsole(interface::Node& node, const PlatformStyle *platformStyle, QWidget *parent);
|
explicit RPCConsole(interfaces::Node& node, const PlatformStyle *platformStyle, QWidget *parent);
|
||||||
~RPCConsole();
|
~RPCConsole();
|
||||||
|
|
||||||
static bool RPCParseCommandLine(interface::Node* node, std::string &strResult, const std::string &strCommand, bool fExecute, std::string * const pstrFilteredOut = nullptr, const std::string *walletID = nullptr);
|
static bool RPCParseCommandLine(interfaces::Node* node, std::string &strResult, const std::string &strCommand, bool fExecute, std::string * const pstrFilteredOut = nullptr, const std::string *walletID = nullptr);
|
||||||
static bool RPCExecuteCommandLine(interface::Node& node, std::string &strResult, const std::string &strCommand, std::string * const pstrFilteredOut = nullptr, const std::string *walletID = nullptr) {
|
static bool RPCExecuteCommandLine(interfaces::Node& node, std::string &strResult, const std::string &strCommand, std::string * const pstrFilteredOut = nullptr, const std::string *walletID = nullptr) {
|
||||||
return RPCParseCommandLine(&node, strResult, strCommand, true, pstrFilteredOut, walletID);
|
return RPCParseCommandLine(&node, strResult, strCommand, true, pstrFilteredOut, walletID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -144,7 +144,7 @@ private:
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
interface::Node& m_node;
|
interfaces::Node& m_node;
|
||||||
Ui::RPCConsole *ui;
|
Ui::RPCConsole *ui;
|
||||||
ClientModel *clientModel;
|
ClientModel *clientModel;
|
||||||
QStringList history;
|
QStringList history;
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
#include <qt/sendcoinsentry.h>
|
#include <qt/sendcoinsentry.h>
|
||||||
|
|
||||||
#include <chainparams.h>
|
#include <chainparams.h>
|
||||||
#include <interface/node.h>
|
#include <interfaces/node.h>
|
||||||
#include <key_io.h>
|
#include <key_io.h>
|
||||||
#include <wallet/coincontrol.h>
|
#include <wallet/coincontrol.h>
|
||||||
#include <ui_interface.h>
|
#include <ui_interface.h>
|
||||||
|
@ -149,9 +149,9 @@ void SendCoinsDialog::setModel(WalletModel *_model)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
interface::WalletBalances balances = _model->wallet().getBalances();
|
interfaces::WalletBalances balances = _model->wallet().getBalances();
|
||||||
setBalance(balances);
|
setBalance(balances);
|
||||||
connect(_model, SIGNAL(balanceChanged(interface::WalletBalances)), this, SLOT(setBalance(interface::WalletBalances)));
|
connect(_model, SIGNAL(balanceChanged(interfaces::WalletBalances)), this, SLOT(setBalance(interfaces::WalletBalances)));
|
||||||
connect(_model->getOptionsModel(), SIGNAL(displayUnitChanged(int)), this, SLOT(updateDisplayUnit()));
|
connect(_model->getOptionsModel(), SIGNAL(displayUnitChanged(int)), this, SLOT(updateDisplayUnit()));
|
||||||
updateDisplayUnit();
|
updateDisplayUnit();
|
||||||
|
|
||||||
|
@ -515,7 +515,7 @@ bool SendCoinsDialog::handlePaymentRequest(const SendCoinsRecipient &rv)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SendCoinsDialog::setBalance(const interface::WalletBalances& balances)
|
void SendCoinsDialog::setBalance(const interfaces::WalletBalances& balances)
|
||||||
{
|
{
|
||||||
if(model && model->getOptionsModel())
|
if(model && model->getOptionsModel())
|
||||||
{
|
{
|
||||||
|
|
|
@ -51,7 +51,7 @@ public Q_SLOTS:
|
||||||
void accept();
|
void accept();
|
||||||
SendCoinsEntry *addEntry();
|
SendCoinsEntry *addEntry();
|
||||||
void updateTabsAndLabels();
|
void updateTabsAndLabels();
|
||||||
void setBalance(const interface::WalletBalances& balances);
|
void setBalance(const interfaces::WalletBalances& balances);
|
||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
void coinsSent(const uint256& txid);
|
void coinsSent(const uint256& txid);
|
||||||
|
|
|
@ -127,7 +127,7 @@ void SendCoinsEntry::useAvailableBalanceClicked()
|
||||||
Q_EMIT useAvailableBalance(this);
|
Q_EMIT useAvailableBalance(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SendCoinsEntry::validate(interface::Node& node)
|
bool SendCoinsEntry::validate(interfaces::Node& node)
|
||||||
{
|
{
|
||||||
if (!model)
|
if (!model)
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -30,7 +30,7 @@ public:
|
||||||
~SendCoinsEntry();
|
~SendCoinsEntry();
|
||||||
|
|
||||||
void setModel(WalletModel *model);
|
void setModel(WalletModel *model);
|
||||||
bool validate(interface::Node& node);
|
bool validate(interfaces::Node& node);
|
||||||
SendCoinsRecipient getValue();
|
SendCoinsRecipient getValue();
|
||||||
|
|
||||||
/** Return whether the entry is still empty and unedited */
|
/** Return whether the entry is still empty and unedited */
|
||||||
|
|
|
@ -12,9 +12,9 @@
|
||||||
|
|
||||||
#include <clientversion.h>
|
#include <clientversion.h>
|
||||||
#include <init.h>
|
#include <init.h>
|
||||||
#include <interface/handler.h>
|
#include <interfaces/handler.h>
|
||||||
#include <interface/node.h>
|
#include <interfaces/node.h>
|
||||||
#include <interface/wallet.h>
|
#include <interfaces/wallet.h>
|
||||||
#include <util.h>
|
#include <util.h>
|
||||||
#include <ui_interface.h>
|
#include <ui_interface.h>
|
||||||
#include <version.h>
|
#include <version.h>
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
#include <QRadialGradient>
|
#include <QRadialGradient>
|
||||||
|
|
||||||
SplashScreen::SplashScreen(interface::Node& node, Qt::WindowFlags f, const NetworkStyle *networkStyle) :
|
SplashScreen::SplashScreen(interfaces::Node& node, Qt::WindowFlags f, const NetworkStyle *networkStyle) :
|
||||||
QWidget(0, f), curAlignment(0), m_node(node)
|
QWidget(0, f), curAlignment(0), m_node(node)
|
||||||
{
|
{
|
||||||
// set reference point, paddings
|
// set reference point, paddings
|
||||||
|
@ -177,7 +177,7 @@ static void ShowProgress(SplashScreen *splash, const std::string &title, int nPr
|
||||||
strprintf("\n%d", nProgress) + "%");
|
strprintf("\n%d", nProgress) + "%");
|
||||||
}
|
}
|
||||||
#ifdef ENABLE_WALLET
|
#ifdef ENABLE_WALLET
|
||||||
void SplashScreen::ConnectWallet(std::unique_ptr<interface::Wallet> wallet)
|
void SplashScreen::ConnectWallet(std::unique_ptr<interfaces::Wallet> wallet)
|
||||||
{
|
{
|
||||||
m_connected_wallet_handlers.emplace_back(wallet->handleShowProgress(boost::bind(ShowProgress, this, _1, _2, false)));
|
m_connected_wallet_handlers.emplace_back(wallet->handleShowProgress(boost::bind(ShowProgress, this, _1, _2, false)));
|
||||||
m_connected_wallets.emplace_back(std::move(wallet));
|
m_connected_wallets.emplace_back(std::move(wallet));
|
||||||
|
@ -190,7 +190,7 @@ void SplashScreen::subscribeToCoreSignals()
|
||||||
m_handler_init_message = m_node.handleInitMessage(boost::bind(InitMessage, this, _1));
|
m_handler_init_message = m_node.handleInitMessage(boost::bind(InitMessage, this, _1));
|
||||||
m_handler_show_progress = m_node.handleShowProgress(boost::bind(ShowProgress, this, _1, _2, _3));
|
m_handler_show_progress = m_node.handleShowProgress(boost::bind(ShowProgress, this, _1, _2, _3));
|
||||||
#ifdef ENABLE_WALLET
|
#ifdef ENABLE_WALLET
|
||||||
m_handler_load_wallet = m_node.handleLoadWallet([this](std::unique_ptr<interface::Wallet> wallet) { ConnectWallet(std::move(wallet)); });
|
m_handler_load_wallet = m_node.handleLoadWallet([this](std::unique_ptr<interfaces::Wallet> wallet) { ConnectWallet(std::move(wallet)); });
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
class NetworkStyle;
|
class NetworkStyle;
|
||||||
|
|
||||||
namespace interface {
|
namespace interfaces {
|
||||||
class Handler;
|
class Handler;
|
||||||
class Node;
|
class Node;
|
||||||
class Wallet;
|
class Wallet;
|
||||||
|
@ -29,7 +29,7 @@ class SplashScreen : public QWidget
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit SplashScreen(interface::Node& node, Qt::WindowFlags f, const NetworkStyle *networkStyle);
|
explicit SplashScreen(interfaces::Node& node, Qt::WindowFlags f, const NetworkStyle *networkStyle);
|
||||||
~SplashScreen();
|
~SplashScreen();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@ -52,19 +52,19 @@ private:
|
||||||
/** Disconnect core signals to splash screen */
|
/** Disconnect core signals to splash screen */
|
||||||
void unsubscribeFromCoreSignals();
|
void unsubscribeFromCoreSignals();
|
||||||
/** Connect wallet signals to splash screen */
|
/** Connect wallet signals to splash screen */
|
||||||
void ConnectWallet(std::unique_ptr<interface::Wallet> wallet);
|
void ConnectWallet(std::unique_ptr<interfaces::Wallet> wallet);
|
||||||
|
|
||||||
QPixmap pixmap;
|
QPixmap pixmap;
|
||||||
QString curMessage;
|
QString curMessage;
|
||||||
QColor curColor;
|
QColor curColor;
|
||||||
int curAlignment;
|
int curAlignment;
|
||||||
|
|
||||||
interface::Node& m_node;
|
interfaces::Node& m_node;
|
||||||
std::unique_ptr<interface::Handler> m_handler_init_message;
|
std::unique_ptr<interfaces::Handler> m_handler_init_message;
|
||||||
std::unique_ptr<interface::Handler> m_handler_show_progress;
|
std::unique_ptr<interfaces::Handler> m_handler_show_progress;
|
||||||
std::unique_ptr<interface::Handler> m_handler_load_wallet;
|
std::unique_ptr<interfaces::Handler> m_handler_load_wallet;
|
||||||
std::list<std::unique_ptr<interface::Wallet>> m_connected_wallets;
|
std::list<std::unique_ptr<interfaces::Wallet>> m_connected_wallets;
|
||||||
std::list<std::unique_ptr<interface::Handler>> m_connected_wallet_handlers;
|
std::list<std::unique_ptr<interfaces::Handler>> m_connected_wallet_handlers;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // BITCOIN_QT_SPLASHSCREEN_H
|
#endif // BITCOIN_QT_SPLASHSCREEN_H
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
#include <amount.h>
|
#include <amount.h>
|
||||||
#include <chainparams.h>
|
#include <chainparams.h>
|
||||||
#include <interface/node.h>
|
#include <interfaces/node.h>
|
||||||
#include <random.h>
|
#include <random.h>
|
||||||
#include <script/script.h>
|
#include <script/script.h>
|
||||||
#include <script/standard.h>
|
#include <script/standard.h>
|
||||||
|
@ -67,7 +67,7 @@ static SendCoinsRecipient handleRequest(PaymentServer* server, std::vector<unsig
|
||||||
void PaymentServerTests::paymentServerTests()
|
void PaymentServerTests::paymentServerTests()
|
||||||
{
|
{
|
||||||
SelectParams(CBaseChainParams::MAIN);
|
SelectParams(CBaseChainParams::MAIN);
|
||||||
auto node = interface::MakeNode();
|
auto node = interfaces::MakeNode();
|
||||||
OptionsModel optionsModel(*node);
|
OptionsModel optionsModel(*node);
|
||||||
PaymentServer* server = new PaymentServer(nullptr, false);
|
PaymentServer* server = new PaymentServer(nullptr, false);
|
||||||
X509_STORE* caStore = X509_STORE_new();
|
X509_STORE* caStore = X509_STORE_new();
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
#include <chainparams.h>
|
#include <chainparams.h>
|
||||||
#include <consensus/validation.h>
|
#include <consensus/validation.h>
|
||||||
#include <fs.h>
|
#include <fs.h>
|
||||||
#include <interface/node.h>
|
#include <interfaces/node.h>
|
||||||
#include <validation.h>
|
#include <validation.h>
|
||||||
#include <rpc/register.h>
|
#include <rpc/register.h>
|
||||||
#include <rpc/server.h>
|
#include <rpc/server.h>
|
||||||
|
@ -46,7 +46,7 @@ void RPCNestedTests::rpcNestedTests()
|
||||||
std::string result;
|
std::string result;
|
||||||
std::string result2;
|
std::string result2;
|
||||||
std::string filtered;
|
std::string filtered;
|
||||||
auto node = interface::MakeNode();
|
auto node = interfaces::MakeNode();
|
||||||
RPCConsole::RPCExecuteCommandLine(*node, result, "getblockchaininfo()[chain]", &filtered); //simple result filtering with path
|
RPCConsole::RPCExecuteCommandLine(*node, result, "getblockchaininfo()[chain]", &filtered); //simple result filtering with path
|
||||||
QVERIFY(result=="main");
|
QVERIFY(result=="main");
|
||||||
QVERIFY(filtered == "getblockchaininfo()[chain]");
|
QVERIFY(filtered == "getblockchaininfo()[chain]");
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#include <qt/test/wallettests.h>
|
#include <qt/test/wallettests.h>
|
||||||
|
|
||||||
#include <interface/node.h>
|
#include <interfaces/node.h>
|
||||||
#include <qt/bitcoinamountfield.h>
|
#include <qt/bitcoinamountfield.h>
|
||||||
#include <qt/callback.h>
|
#include <qt/callback.h>
|
||||||
#include <qt/optionsmodel.h>
|
#include <qt/optionsmodel.h>
|
||||||
|
@ -178,7 +178,7 @@ void TestGUI()
|
||||||
std::unique_ptr<const PlatformStyle> platformStyle(PlatformStyle::instantiate("other"));
|
std::unique_ptr<const PlatformStyle> platformStyle(PlatformStyle::instantiate("other"));
|
||||||
SendCoinsDialog sendCoinsDialog(platformStyle.get());
|
SendCoinsDialog sendCoinsDialog(platformStyle.get());
|
||||||
TransactionView transactionView(platformStyle.get());
|
TransactionView transactionView(platformStyle.get());
|
||||||
auto node = interface::MakeNode();
|
auto node = interfaces::MakeNode();
|
||||||
OptionsModel optionsModel(*node);
|
OptionsModel optionsModel(*node);
|
||||||
vpwallets.insert(vpwallets.begin(), &wallet);
|
vpwallets.insert(vpwallets.begin(), &wallet);
|
||||||
WalletModel walletModel(std::move(node->getWallets()[0]), *node, platformStyle.get(), &optionsModel);
|
WalletModel walletModel(std::move(node->getWallets()[0]), *node, platformStyle.get(), &optionsModel);
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// Distributed under the MIT software license, see the accompanying
|
// Distributed under the MIT software license, see the accompanying
|
||||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||||
|
|
||||||
#include <interface/node.h>
|
#include <interfaces/node.h>
|
||||||
#include <qt/trafficgraphwidget.h>
|
#include <qt/trafficgraphwidget.h>
|
||||||
#include <qt/clientmodel.h>
|
#include <qt/clientmodel.h>
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
#include <qt/transactionrecord.h>
|
#include <qt/transactionrecord.h>
|
||||||
|
|
||||||
#include <consensus/consensus.h>
|
#include <consensus/consensus.h>
|
||||||
#include <interface/node.h>
|
#include <interfaces/node.h>
|
||||||
#include <key_io.h>
|
#include <key_io.h>
|
||||||
#include <validation.h>
|
#include <validation.h>
|
||||||
#include <script/script.h>
|
#include <script/script.h>
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
QString TransactionDesc::FormatTxStatus(const interface::WalletTx& wtx, const interface::WalletTxStatus& status, bool inMempool, int numBlocks, int64_t adjustedTime)
|
QString TransactionDesc::FormatTxStatus(const interfaces::WalletTx& wtx, const interfaces::WalletTxStatus& status, bool inMempool, int numBlocks, int64_t adjustedTime)
|
||||||
{
|
{
|
||||||
if (!status.is_final)
|
if (!status.is_final)
|
||||||
{
|
{
|
||||||
|
@ -48,14 +48,14 @@ QString TransactionDesc::FormatTxStatus(const interface::WalletTx& wtx, const in
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QString TransactionDesc::toHTML(interface::Node& node, interface::Wallet& wallet, TransactionRecord *rec, int unit)
|
QString TransactionDesc::toHTML(interfaces::Node& node, interfaces::Wallet& wallet, TransactionRecord *rec, int unit)
|
||||||
{
|
{
|
||||||
int numBlocks;
|
int numBlocks;
|
||||||
int64_t adjustedTime;
|
int64_t adjustedTime;
|
||||||
interface::WalletTxStatus status;
|
interfaces::WalletTxStatus status;
|
||||||
interface::WalletOrderForm orderForm;
|
interfaces::WalletOrderForm orderForm;
|
||||||
bool inMempool;
|
bool inMempool;
|
||||||
interface::WalletTx wtx = wallet.getWalletTxDetails(rec->hash, status, orderForm, inMempool, numBlocks, adjustedTime);
|
interfaces::WalletTx wtx = wallet.getWalletTxDetails(rec->hash, status, orderForm, inMempool, numBlocks, adjustedTime);
|
||||||
|
|
||||||
QString strHTML;
|
QString strHTML;
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
class TransactionRecord;
|
class TransactionRecord;
|
||||||
|
|
||||||
namespace interface {
|
namespace interfaces {
|
||||||
class Node;
|
class Node;
|
||||||
class Wallet;
|
class Wallet;
|
||||||
struct WalletTx;
|
struct WalletTx;
|
||||||
|
@ -24,12 +24,12 @@ class TransactionDesc: public QObject
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static QString toHTML(interface::Node& node, interface::Wallet& wallet, TransactionRecord *rec, int unit);
|
static QString toHTML(interfaces::Node& node, interfaces::Wallet& wallet, TransactionRecord *rec, int unit);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
TransactionDesc() {}
|
TransactionDesc() {}
|
||||||
|
|
||||||
static QString FormatTxStatus(const interface::WalletTx& wtx, const interface::WalletTxStatus& status, bool inMempool, int numBlocks, int64_t adjustedTime);
|
static QString FormatTxStatus(const interfaces::WalletTx& wtx, const interfaces::WalletTxStatus& status, bool inMempool, int numBlocks, int64_t adjustedTime);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // BITCOIN_QT_TRANSACTIONDESC_H
|
#endif // BITCOIN_QT_TRANSACTIONDESC_H
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
#include <qt/transactionrecord.h>
|
#include <qt/transactionrecord.h>
|
||||||
|
|
||||||
#include <consensus/consensus.h>
|
#include <consensus/consensus.h>
|
||||||
#include <interface/wallet.h>
|
#include <interfaces/wallet.h>
|
||||||
#include <key_io.h>
|
#include <key_io.h>
|
||||||
#include <timedata.h>
|
#include <timedata.h>
|
||||||
#include <validation.h>
|
#include <validation.h>
|
||||||
|
@ -25,7 +25,7 @@ bool TransactionRecord::showTransaction()
|
||||||
/*
|
/*
|
||||||
* Decompose CWallet transaction to model transaction records.
|
* Decompose CWallet transaction to model transaction records.
|
||||||
*/
|
*/
|
||||||
QList<TransactionRecord> TransactionRecord::decomposeTransaction(const interface::WalletTx& wtx)
|
QList<TransactionRecord> TransactionRecord::decomposeTransaction(const interfaces::WalletTx& wtx)
|
||||||
{
|
{
|
||||||
QList<TransactionRecord> parts;
|
QList<TransactionRecord> parts;
|
||||||
int64_t nTime = wtx.time;
|
int64_t nTime = wtx.time;
|
||||||
|
@ -158,7 +158,7 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const interface
|
||||||
return parts;
|
return parts;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TransactionRecord::updateStatus(const interface::WalletTxStatus& wtx, int numBlocks, int64_t adjustedTime)
|
void TransactionRecord::updateStatus(const interfaces::WalletTxStatus& wtx, int numBlocks, int64_t adjustedTime)
|
||||||
{
|
{
|
||||||
// Determine transaction status
|
// Determine transaction status
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
#include <QList>
|
#include <QList>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
namespace interface {
|
namespace interfaces {
|
||||||
class Node;
|
class Node;
|
||||||
class Wallet;
|
class Wallet;
|
||||||
struct WalletTx;
|
struct WalletTx;
|
||||||
|
@ -111,7 +111,7 @@ public:
|
||||||
/** Decompose CWallet transaction to model transaction records.
|
/** Decompose CWallet transaction to model transaction records.
|
||||||
*/
|
*/
|
||||||
static bool showTransaction();
|
static bool showTransaction();
|
||||||
static QList<TransactionRecord> decomposeTransaction(const interface::WalletTx& wtx);
|
static QList<TransactionRecord> decomposeTransaction(const interfaces::WalletTx& wtx);
|
||||||
|
|
||||||
/** @name Immutable transaction attributes
|
/** @name Immutable transaction attributes
|
||||||
@{*/
|
@{*/
|
||||||
|
@ -140,7 +140,7 @@ public:
|
||||||
|
|
||||||
/** Update status from core wallet tx.
|
/** Update status from core wallet tx.
|
||||||
*/
|
*/
|
||||||
void updateStatus(const interface::WalletTxStatus& wtx, int numBlocks, int64_t adjustedTime);
|
void updateStatus(const interfaces::WalletTxStatus& wtx, int numBlocks, int64_t adjustedTime);
|
||||||
|
|
||||||
/** Return whether a status update is needed.
|
/** Return whether a status update is needed.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -14,8 +14,8 @@
|
||||||
#include <qt/walletmodel.h>
|
#include <qt/walletmodel.h>
|
||||||
|
|
||||||
#include <core_io.h>
|
#include <core_io.h>
|
||||||
#include <interface/handler.h>
|
#include <interfaces/handler.h>
|
||||||
#include <interface/node.h>
|
#include <interfaces/node.h>
|
||||||
#include <validation.h>
|
#include <validation.h>
|
||||||
#include <sync.h>
|
#include <sync.h>
|
||||||
#include <uint256.h>
|
#include <uint256.h>
|
||||||
|
@ -73,7 +73,7 @@ public:
|
||||||
|
|
||||||
/* Query entire wallet anew from core.
|
/* Query entire wallet anew from core.
|
||||||
*/
|
*/
|
||||||
void refreshWallet(interface::Wallet& wallet)
|
void refreshWallet(interfaces::Wallet& wallet)
|
||||||
{
|
{
|
||||||
qDebug() << "TransactionTablePriv::refreshWallet";
|
qDebug() << "TransactionTablePriv::refreshWallet";
|
||||||
cachedWallet.clear();
|
cachedWallet.clear();
|
||||||
|
@ -91,7 +91,7 @@ public:
|
||||||
|
|
||||||
Call with transaction that was added, removed or changed.
|
Call with transaction that was added, removed or changed.
|
||||||
*/
|
*/
|
||||||
void updateWallet(interface::Wallet& wallet, const uint256 &hash, int status, bool showTransaction)
|
void updateWallet(interfaces::Wallet& wallet, const uint256 &hash, int status, bool showTransaction)
|
||||||
{
|
{
|
||||||
qDebug() << "TransactionTablePriv::updateWallet: " + QString::fromStdString(hash.ToString()) + " " + QString::number(status);
|
qDebug() << "TransactionTablePriv::updateWallet: " + QString::fromStdString(hash.ToString()) + " " + QString::number(status);
|
||||||
|
|
||||||
|
@ -127,7 +127,7 @@ public:
|
||||||
if(showTransaction)
|
if(showTransaction)
|
||||||
{
|
{
|
||||||
// Find transaction in wallet
|
// Find transaction in wallet
|
||||||
interface::WalletTx wtx = wallet.getWalletTx(hash);
|
interfaces::WalletTx wtx = wallet.getWalletTx(hash);
|
||||||
if(!wtx.tx)
|
if(!wtx.tx)
|
||||||
{
|
{
|
||||||
qWarning() << "TransactionTablePriv::updateWallet: Warning: Got CT_NEW, but transaction is not in wallet";
|
qWarning() << "TransactionTablePriv::updateWallet: Warning: Got CT_NEW, but transaction is not in wallet";
|
||||||
|
@ -176,7 +176,7 @@ public:
|
||||||
return cachedWallet.size();
|
return cachedWallet.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
TransactionRecord *index(interface::Wallet& wallet, int idx)
|
TransactionRecord *index(interfaces::Wallet& wallet, int idx)
|
||||||
{
|
{
|
||||||
if(idx >= 0 && idx < cachedWallet.size())
|
if(idx >= 0 && idx < cachedWallet.size())
|
||||||
{
|
{
|
||||||
|
@ -189,7 +189,7 @@ public:
|
||||||
// If a status update is needed (blocks came in since last check),
|
// If a status update is needed (blocks came in since last check),
|
||||||
// update the status of this transaction from the wallet. Otherwise,
|
// update the status of this transaction from the wallet. Otherwise,
|
||||||
// simply re-use the cached status.
|
// simply re-use the cached status.
|
||||||
interface::WalletTxStatus wtx;
|
interfaces::WalletTxStatus wtx;
|
||||||
int numBlocks;
|
int numBlocks;
|
||||||
int64_t adjustedTime;
|
int64_t adjustedTime;
|
||||||
if (wallet.tryGetTxStatus(rec->hash, wtx, numBlocks, adjustedTime) && rec->statusUpdateNeeded(numBlocks)) {
|
if (wallet.tryGetTxStatus(rec->hash, wtx, numBlocks, adjustedTime) && rec->statusUpdateNeeded(numBlocks)) {
|
||||||
|
@ -200,12 +200,12 @@ public:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString describe(interface::Node& node, interface::Wallet& wallet, TransactionRecord *rec, int unit)
|
QString describe(interfaces::Node& node, interfaces::Wallet& wallet, TransactionRecord *rec, int unit)
|
||||||
{
|
{
|
||||||
return TransactionDesc::toHTML(node, wallet, rec, unit);
|
return TransactionDesc::toHTML(node, wallet, rec, unit);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString getTxHex(interface::Wallet& wallet, TransactionRecord *rec)
|
QString getTxHex(interfaces::Wallet& wallet, TransactionRecord *rec)
|
||||||
{
|
{
|
||||||
auto tx = wallet.getTx(rec->hash);
|
auto tx = wallet.getTx(rec->hash);
|
||||||
if (tx) {
|
if (tx) {
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
namespace interface {
|
namespace interfaces {
|
||||||
class Handler;
|
class Handler;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -85,8 +85,8 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
WalletModel *walletModel;
|
WalletModel *walletModel;
|
||||||
std::unique_ptr<interface::Handler> m_handler_transaction_changed;
|
std::unique_ptr<interfaces::Handler> m_handler_transaction_changed;
|
||||||
std::unique_ptr<interface::Handler> m_handler_show_progress;
|
std::unique_ptr<interfaces::Handler> m_handler_show_progress;
|
||||||
QStringList columns;
|
QStringList columns;
|
||||||
TransactionTablePriv *priv;
|
TransactionTablePriv *priv;
|
||||||
bool fProcessingQueuedTransactions;
|
bool fProcessingQueuedTransactions;
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
#include <clientversion.h>
|
#include <clientversion.h>
|
||||||
#include <init.h>
|
#include <init.h>
|
||||||
#include <interface/node.h>
|
#include <interfaces/node.h>
|
||||||
#include <util.h>
|
#include <util.h>
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -32,7 +32,7 @@
|
||||||
#include <QVBoxLayout>
|
#include <QVBoxLayout>
|
||||||
|
|
||||||
/** "Help message" or "About" dialog box */
|
/** "Help message" or "About" dialog box */
|
||||||
HelpMessageDialog::HelpMessageDialog(interface::Node& node, QWidget *parent, bool about) :
|
HelpMessageDialog::HelpMessageDialog(interfaces::Node& node, QWidget *parent, bool about) :
|
||||||
QDialog(parent),
|
QDialog(parent),
|
||||||
ui(new Ui::HelpMessageDialog)
|
ui(new Ui::HelpMessageDialog)
|
||||||
{
|
{
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
class BitcoinGUI;
|
class BitcoinGUI;
|
||||||
|
|
||||||
namespace interface {
|
namespace interfaces {
|
||||||
class Node;
|
class Node;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ class HelpMessageDialog : public QDialog
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit HelpMessageDialog(interface::Node& node, QWidget *parent, bool about);
|
explicit HelpMessageDialog(interfaces::Node& node, QWidget *parent, bool about);
|
||||||
~HelpMessageDialog();
|
~HelpMessageDialog();
|
||||||
|
|
||||||
void printToConsole();
|
void printToConsole();
|
||||||
|
|
|
@ -12,8 +12,8 @@
|
||||||
#include <qt/sendcoinsdialog.h>
|
#include <qt/sendcoinsdialog.h>
|
||||||
#include <qt/transactiontablemodel.h>
|
#include <qt/transactiontablemodel.h>
|
||||||
|
|
||||||
#include <interface/handler.h>
|
#include <interfaces/handler.h>
|
||||||
#include <interface/node.h>
|
#include <interfaces/node.h>
|
||||||
#include <key_io.h>
|
#include <key_io.h>
|
||||||
#include <ui_interface.h>
|
#include <ui_interface.h>
|
||||||
#include <util.h> // for GetBoolArg
|
#include <util.h> // for GetBoolArg
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
|
||||||
|
|
||||||
WalletModel::WalletModel(std::unique_ptr<interface::Wallet> wallet, interface::Node& node, const PlatformStyle *platformStyle, OptionsModel *_optionsModel, QObject *parent) :
|
WalletModel::WalletModel(std::unique_ptr<interfaces::Wallet> wallet, interfaces::Node& node, const PlatformStyle *platformStyle, OptionsModel *_optionsModel, QObject *parent) :
|
||||||
QObject(parent), m_wallet(std::move(wallet)), m_node(node), optionsModel(_optionsModel), addressTableModel(0),
|
QObject(parent), m_wallet(std::move(wallet)), m_node(node), optionsModel(_optionsModel), addressTableModel(0),
|
||||||
transactionTableModel(0),
|
transactionTableModel(0),
|
||||||
recentRequestsTableModel(0),
|
recentRequestsTableModel(0),
|
||||||
|
@ -70,7 +70,7 @@ void WalletModel::pollBalanceChanged()
|
||||||
// avoids the GUI from getting stuck on periodical polls if the core is
|
// avoids the GUI from getting stuck on periodical polls if the core is
|
||||||
// holding the locks for a longer time - for example, during a wallet
|
// holding the locks for a longer time - for example, during a wallet
|
||||||
// rescan.
|
// rescan.
|
||||||
interface::WalletBalances new_balances;
|
interfaces::WalletBalances new_balances;
|
||||||
int numBlocks = -1;
|
int numBlocks = -1;
|
||||||
if (!m_wallet->tryGetBalances(new_balances, numBlocks)) {
|
if (!m_wallet->tryGetBalances(new_balances, numBlocks)) {
|
||||||
return;
|
return;
|
||||||
|
@ -89,7 +89,7 @@ void WalletModel::pollBalanceChanged()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void WalletModel::checkBalanceChanged(const interface::WalletBalances& new_balances)
|
void WalletModel::checkBalanceChanged(const interfaces::WalletBalances& new_balances)
|
||||||
{
|
{
|
||||||
if(new_balances.balanceChanged(m_cached_balances)) {
|
if(new_balances.balanceChanged(m_cached_balances)) {
|
||||||
m_cached_balances = new_balances;
|
m_cached_balances = new_balances;
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
#include <qt/paymentrequestplus.h>
|
#include <qt/paymentrequestplus.h>
|
||||||
#include <qt/walletmodeltransaction.h>
|
#include <qt/walletmodeltransaction.h>
|
||||||
|
|
||||||
#include <interface/wallet.h>
|
#include <interfaces/wallet.h>
|
||||||
#include <support/allocators/secure.h>
|
#include <support/allocators/secure.h>
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
|
@ -37,9 +37,9 @@ class COutput;
|
||||||
class CPubKey;
|
class CPubKey;
|
||||||
class uint256;
|
class uint256;
|
||||||
|
|
||||||
namespace interface {
|
namespace interfaces {
|
||||||
class Node;
|
class Node;
|
||||||
} // namespace interface
|
} // namespace interfaces
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
class QTimer;
|
class QTimer;
|
||||||
|
@ -111,7 +111,7 @@ class WalletModel : public QObject
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit WalletModel(std::unique_ptr<interface::Wallet> wallet, interface::Node& node, const PlatformStyle *platformStyle, OptionsModel *optionsModel, QObject *parent = 0);
|
explicit WalletModel(std::unique_ptr<interfaces::Wallet> wallet, interfaces::Node& node, const PlatformStyle *platformStyle, OptionsModel *optionsModel, QObject *parent = 0);
|
||||||
~WalletModel();
|
~WalletModel();
|
||||||
|
|
||||||
enum StatusCode // Returned by sendCoins
|
enum StatusCode // Returned by sendCoins
|
||||||
|
@ -198,20 +198,20 @@ public:
|
||||||
|
|
||||||
static bool isWalletEnabled();
|
static bool isWalletEnabled();
|
||||||
|
|
||||||
interface::Node& node() const { return m_node; }
|
interfaces::Node& node() const { return m_node; }
|
||||||
interface::Wallet& wallet() const { return *m_wallet; }
|
interfaces::Wallet& wallet() const { return *m_wallet; }
|
||||||
|
|
||||||
QString getWalletName() const;
|
QString getWalletName() const;
|
||||||
|
|
||||||
bool isMultiwallet();
|
bool isMultiwallet();
|
||||||
private:
|
private:
|
||||||
std::unique_ptr<interface::Wallet> m_wallet;
|
std::unique_ptr<interfaces::Wallet> m_wallet;
|
||||||
std::unique_ptr<interface::Handler> m_handler_status_changed;
|
std::unique_ptr<interfaces::Handler> m_handler_status_changed;
|
||||||
std::unique_ptr<interface::Handler> m_handler_address_book_changed;
|
std::unique_ptr<interfaces::Handler> m_handler_address_book_changed;
|
||||||
std::unique_ptr<interface::Handler> m_handler_transaction_changed;
|
std::unique_ptr<interfaces::Handler> m_handler_transaction_changed;
|
||||||
std::unique_ptr<interface::Handler> m_handler_show_progress;
|
std::unique_ptr<interfaces::Handler> m_handler_show_progress;
|
||||||
std::unique_ptr<interface::Handler> m_handler_watch_only_changed;
|
std::unique_ptr<interfaces::Handler> m_handler_watch_only_changed;
|
||||||
interface::Node& m_node;
|
interfaces::Node& m_node;
|
||||||
|
|
||||||
bool fHaveWatchOnly;
|
bool fHaveWatchOnly;
|
||||||
bool fForceCheckBalanceChanged;
|
bool fForceCheckBalanceChanged;
|
||||||
|
@ -225,7 +225,7 @@ private:
|
||||||
RecentRequestsTableModel *recentRequestsTableModel;
|
RecentRequestsTableModel *recentRequestsTableModel;
|
||||||
|
|
||||||
// Cache some values to be able to detect changes
|
// Cache some values to be able to detect changes
|
||||||
interface::WalletBalances m_cached_balances;
|
interfaces::WalletBalances m_cached_balances;
|
||||||
EncryptionStatus cachedEncryptionStatus;
|
EncryptionStatus cachedEncryptionStatus;
|
||||||
int cachedNumBlocks;
|
int cachedNumBlocks;
|
||||||
|
|
||||||
|
@ -233,11 +233,11 @@ private:
|
||||||
|
|
||||||
void subscribeToCoreSignals();
|
void subscribeToCoreSignals();
|
||||||
void unsubscribeFromCoreSignals();
|
void unsubscribeFromCoreSignals();
|
||||||
void checkBalanceChanged(const interface::WalletBalances& new_balances);
|
void checkBalanceChanged(const interfaces::WalletBalances& new_balances);
|
||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
// Signal that balance in wallet changed
|
// Signal that balance in wallet changed
|
||||||
void balanceChanged(const interface::WalletBalances& balances);
|
void balanceChanged(const interfaces::WalletBalances& balances);
|
||||||
|
|
||||||
// Encryption status of wallet changed
|
// Encryption status of wallet changed
|
||||||
void encryptionStatusChanged();
|
void encryptionStatusChanged();
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
#include <qt/walletmodeltransaction.h>
|
#include <qt/walletmodeltransaction.h>
|
||||||
|
|
||||||
#include <interface/node.h>
|
#include <interfaces/node.h>
|
||||||
#include <policy/policy.h>
|
#include <policy/policy.h>
|
||||||
|
|
||||||
WalletModelTransaction::WalletModelTransaction(const QList<SendCoinsRecipient> &_recipients) :
|
WalletModelTransaction::WalletModelTransaction(const QList<SendCoinsRecipient> &_recipients) :
|
||||||
|
@ -18,7 +18,7 @@ QList<SendCoinsRecipient> WalletModelTransaction::getRecipients() const
|
||||||
return recipients;
|
return recipients;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::unique_ptr<interface::PendingWalletTx>& WalletModelTransaction::getWtx()
|
std::unique_ptr<interfaces::PendingWalletTx>& WalletModelTransaction::getWtx()
|
||||||
{
|
{
|
||||||
return wtx;
|
return wtx;
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
class SendCoinsRecipient;
|
class SendCoinsRecipient;
|
||||||
|
|
||||||
namespace interface {
|
namespace interfaces {
|
||||||
class Node;
|
class Node;
|
||||||
class PendingWalletTx;
|
class PendingWalletTx;
|
||||||
}
|
}
|
||||||
|
@ -26,7 +26,7 @@ public:
|
||||||
|
|
||||||
QList<SendCoinsRecipient> getRecipients() const;
|
QList<SendCoinsRecipient> getRecipients() const;
|
||||||
|
|
||||||
std::unique_ptr<interface::PendingWalletTx>& getWtx();
|
std::unique_ptr<interfaces::PendingWalletTx>& getWtx();
|
||||||
unsigned int getTransactionSize();
|
unsigned int getTransactionSize();
|
||||||
|
|
||||||
void setTransactionFee(const CAmount& newFee);
|
void setTransactionFee(const CAmount& newFee);
|
||||||
|
@ -38,7 +38,7 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QList<SendCoinsRecipient> recipients;
|
QList<SendCoinsRecipient> recipients;
|
||||||
std::unique_ptr<interface::PendingWalletTx> wtx;
|
std::unique_ptr<interfaces::PendingWalletTx> wtx;
|
||||||
CAmount fee;
|
CAmount fee;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
#include <qt/transactionview.h>
|
#include <qt/transactionview.h>
|
||||||
#include <qt/walletmodel.h>
|
#include <qt/walletmodel.h>
|
||||||
|
|
||||||
#include <interface/node.h>
|
#include <interfaces/node.h>
|
||||||
#include <ui_interface.h>
|
#include <ui_interface.h>
|
||||||
|
|
||||||
#include <QAction>
|
#include <QAction>
|
||||||
|
|
Loading…
Reference in a new issue