Add src/wallet/* code to wallet:: namespace
This commit is contained in:
1 parent
90fc8b089d
commit
f7086fd8ff
94 files changed
+294
-75
No files matched your search
@@ -31,6 +31,9 @@
|
||||
#include <QSettings>
|
||||
#include <QTreeWidget>
|
||||
|
||||
using wallet::CCoinControl;
|
||||
using wallet::MIN_CHANGE;
|
||||
|
||||
QList<CAmount> CoinControlDialog::payAmounts;
|
||||
bool CoinControlDialog::fSubtractFeeFromAmount = false;
|
||||
|
||||
|
||||
@@ -19,7 +19,9 @@
|
||||
class PlatformStyle;
|
||||
class WalletModel;
|
||||
|
||||
namespace wallet {
|
||||
class CCoinControl;
|
||||
} // namespace wallet
|
||||
|
||||
namespace Ui {
|
||||
class CoinControlDialog;
|
||||
@@ -42,11 +44,11 @@ class CoinControlDialog : public QDialog
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit CoinControlDialog(CCoinControl& coin_control, WalletModel* model, const PlatformStyle *platformStyle, QWidget *parent = nullptr);
|
||||
explicit CoinControlDialog(wallet::CCoinControl& coin_control, WalletModel* model, const PlatformStyle *platformStyle, QWidget *parent = nullptr);
|
||||
~CoinControlDialog();
|
||||
|
||||
// static because also called from sendcoinsdialog
|
||||
static void updateLabels(CCoinControl& m_coin_control, WalletModel*, QDialog*);
|
||||
static void updateLabels(wallet::CCoinControl& m_coin_control, WalletModel*, QDialog*);
|
||||
|
||||
static QList<CAmount> payAmounts;
|
||||
static bool fSubtractFeeFromAmount;
|
||||
@@ -56,7 +58,7 @@ protected:
|
||||
|
||||
private:
|
||||
Ui::CoinControlDialog *ui;
|
||||
CCoinControl& m_coin_control;
|
||||
wallet::CCoinControl& m_coin_control;
|
||||
WalletModel *model;
|
||||
int sortColumn;
|
||||
Qt::SortOrder sortOrder;
|
||||
|
||||
@@ -35,6 +35,9 @@
|
||||
#include <QSettings>
|
||||
#include <QTextDocument>
|
||||
|
||||
using wallet::CCoinControl;
|
||||
using wallet::DEFAULT_PAY_TX_FEE;
|
||||
|
||||
static constexpr std::array confTargets{2, 4, 6, 12, 24, 48, 144, 504, 1008};
|
||||
int getConfTargetForIndex(int index) {
|
||||
if (index+1 > static_cast<int>(confTargets.size())) {
|
||||
|
||||
@@ -12,12 +12,14 @@
|
||||
#include <QString>
|
||||
#include <QTimer>
|
||||
|
||||
class CCoinControl;
|
||||
class ClientModel;
|
||||
class PlatformStyle;
|
||||
class SendCoinsEntry;
|
||||
class SendCoinsRecipient;
|
||||
enum class SynchronizationState;
|
||||
namespace wallet {
|
||||
class CCoinControl;
|
||||
} // namespace wallet
|
||||
|
||||
namespace Ui {
|
||||
class SendCoinsDialog;
|
||||
@@ -62,7 +64,7 @@ private:
|
||||
Ui::SendCoinsDialog *ui;
|
||||
ClientModel *clientModel;
|
||||
WalletModel *model;
|
||||
std::unique_ptr<CCoinControl> m_coin_control;
|
||||
std::unique_ptr<wallet::CCoinControl> m_coin_control;
|
||||
std::unique_ptr<WalletModelTransaction> m_current_transaction;
|
||||
bool fNewRecipientAllowed;
|
||||
bool fFeeMinimized;
|
||||
|
||||
@@ -24,6 +24,13 @@
|
||||
#include <QTimer>
|
||||
#include <QMessageBox>
|
||||
|
||||
using wallet::AddWallet;
|
||||
using wallet::CWallet;
|
||||
using wallet::CreateMockWalletDatabase;
|
||||
using wallet::RemoveWallet;
|
||||
using wallet::WALLET_FLAG_DESCRIPTORS;
|
||||
using wallet::WalletContext;
|
||||
|
||||
namespace
|
||||
{
|
||||
|
||||
|
||||
@@ -39,6 +39,15 @@
|
||||
#include <QListView>
|
||||
#include <QDialogButtonBox>
|
||||
|
||||
using wallet::AddWallet;
|
||||
using wallet::CWallet;
|
||||
using wallet::CreateMockWalletDatabase;
|
||||
using wallet::RemoveWallet;
|
||||
using wallet::WALLET_FLAG_DESCRIPTORS;
|
||||
using wallet::WalletContext;
|
||||
using wallet::WalletDescriptor;
|
||||
using wallet::WalletRescanReserver;
|
||||
|
||||
namespace
|
||||
{
|
||||
//! Press "Yes" or "Cancel" buttons in modal send confirmation dialog.
|
||||
|
||||
@@ -28,6 +28,11 @@
|
||||
|
||||
#include <QLatin1String>
|
||||
|
||||
using wallet::ISMINE_ALL;
|
||||
using wallet::ISMINE_SPENDABLE;
|
||||
using wallet::ISMINE_WATCH_ONLY;
|
||||
using wallet::isminetype;
|
||||
|
||||
QString TransactionDesc::FormatTxStatus(const interfaces::WalletTx& wtx, const interfaces::WalletTxStatus& status, bool inMempool, int numBlocks)
|
||||
{
|
||||
if (!status.is_final)
|
||||
|
||||
@@ -13,6 +13,10 @@
|
||||
|
||||
#include <QDateTime>
|
||||
|
||||
using wallet::ISMINE_SPENDABLE;
|
||||
using wallet::ISMINE_WATCH_ONLY;
|
||||
using wallet::isminetype;
|
||||
|
||||
/* Return positive answer if transaction should be shown in list.
|
||||
*/
|
||||
bool TransactionRecord::showTransaction()
|
||||
|
||||
@@ -28,6 +28,11 @@
|
||||
#include <QTimer>
|
||||
#include <QWindow>
|
||||
|
||||
using wallet::WALLET_FLAG_BLANK_WALLET;
|
||||
using wallet::WALLET_FLAG_DESCRIPTORS;
|
||||
using wallet::WALLET_FLAG_DISABLE_PRIVATE_KEYS;
|
||||
using wallet::WALLET_FLAG_EXTERNAL_SIGNER;
|
||||
|
||||
WalletController::WalletController(ClientModel& client_model, const PlatformStyle* platform_style, QObject* parent)
|
||||
: QObject(parent)
|
||||
, m_activity_thread(new QThread(this))
|
||||
|
||||
@@ -36,6 +36,9 @@
|
||||
#include <QSet>
|
||||
#include <QTimer>
|
||||
|
||||
using wallet::CCoinControl;
|
||||
using wallet::CRecipient;
|
||||
using wallet::DEFAULT_DISABLE_WALLET;
|
||||
|
||||
WalletModel::WalletModel(std::unique_ptr<interfaces::Wallet> wallet, ClientModel& client_model, const PlatformStyle *platformStyle, QObject *parent) :
|
||||
QObject(parent),
|
||||
|
||||
@@ -32,16 +32,17 @@ class SendCoinsRecipient;
|
||||
class TransactionTableModel;
|
||||
class WalletModelTransaction;
|
||||
|
||||
class CCoinControl;
|
||||
class CKeyID;
|
||||
class COutPoint;
|
||||
class COutput;
|
||||
class CPubKey;
|
||||
class uint256;
|
||||
|
||||
namespace interfaces {
|
||||
class Node;
|
||||
} // namespace interfaces
|
||||
namespace wallet {
|
||||
class CCoinControl;
|
||||
} // namespace wallet
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QTimer;
|
||||
@@ -99,7 +100,7 @@ public:
|
||||
};
|
||||
|
||||
// prepare transaction for getting txfee before sending coins
|
||||
SendCoinsReturn prepareTransaction(WalletModelTransaction &transaction, const CCoinControl& coinControl);
|
||||
SendCoinsReturn prepareTransaction(WalletModelTransaction &transaction, const wallet::CCoinControl& coinControl);
|
||||
|
||||
// Send coins to a list of recipients
|
||||
SendCoinsReturn sendCoins(WalletModelTransaction &transaction);
|
||||
|
||||
Reference in new issue
Block a user