Bitcoin Core  22.99.0
P2P Digital Currency
wallettests.cpp
Go to the documentation of this file.
1 // Copyright (c) 2015-2020 The Bitcoin Core developers
2 // Distributed under the MIT software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
4 
5 #include <qt/test/wallettests.h>
6 #include <qt/test/util.h>
7 
8 #include <interfaces/chain.h>
9 #include <interfaces/node.h>
10 #include <qt/bitcoinamountfield.h>
11 #include <qt/clientmodel.h>
12 #include <qt/optionsmodel.h>
13 #include <qt/platformstyle.h>
14 #include <qt/qvalidatedlineedit.h>
15 #include <qt/sendcoinsdialog.h>
16 #include <qt/sendcoinsentry.h>
18 #include <qt/transactionview.h>
19 #include <qt/walletmodel.h>
20 #include <key_io.h>
21 #include <test/util/setup_common.h>
22 #include <validation.h>
23 #include <wallet/wallet.h>
24 #include <qt/overviewpage.h>
25 #include <qt/receivecoinsdialog.h>
28 
29 #include <memory>
30 
31 #include <QAbstractButton>
32 #include <QAction>
33 #include <QApplication>
34 #include <QCheckBox>
35 #include <QPushButton>
36 #include <QTimer>
37 #include <QVBoxLayout>
38 #include <QTextEdit>
39 #include <QListView>
40 #include <QDialogButtonBox>
41 
42 namespace
43 {
45 void ConfirmSend(QString* text = nullptr, bool cancel = false)
46 {
47  QTimer::singleShot(0, [text, cancel]() {
48  for (QWidget* widget : QApplication::topLevelWidgets()) {
49  if (widget->inherits("SendConfirmationDialog")) {
50  SendConfirmationDialog* dialog = qobject_cast<SendConfirmationDialog*>(widget);
51  if (text) *text = dialog->text();
52  QAbstractButton* button = dialog->button(cancel ? QMessageBox::Cancel : QMessageBox::Yes);
53  button->setEnabled(true);
54  button->click();
55  }
56  }
57  });
58 }
59 
61 uint256 SendCoins(CWallet& wallet, SendCoinsDialog& sendCoinsDialog, const CTxDestination& address, CAmount amount, bool rbf)
62 {
63  QVBoxLayout* entries = sendCoinsDialog.findChild<QVBoxLayout*>("entries");
64  SendCoinsEntry* entry = qobject_cast<SendCoinsEntry*>(entries->itemAt(0)->widget());
65  entry->findChild<QValidatedLineEdit*>("payTo")->setText(QString::fromStdString(EncodeDestination(address)));
66  entry->findChild<BitcoinAmountField*>("payAmount")->setValue(amount);
67  sendCoinsDialog.findChild<QFrame*>("frameFee")
68  ->findChild<QFrame*>("frameFeeSelection")
69  ->findChild<QCheckBox*>("optInRBF")
70  ->setCheckState(rbf ? Qt::Checked : Qt::Unchecked);
71  uint256 txid;
72  boost::signals2::scoped_connection c(wallet.NotifyTransactionChanged.connect([&txid](const uint256& hash, ChangeType status) {
73  if (status == CT_NEW) txid = hash;
74  }));
75  ConfirmSend();
76  bool invoked = QMetaObject::invokeMethod(&sendCoinsDialog, "sendButtonClicked", Q_ARG(bool, false));
77  assert(invoked);
78  return txid;
79 }
80 
82 QModelIndex FindTx(const QAbstractItemModel& model, const uint256& txid)
83 {
84  QString hash = QString::fromStdString(txid.ToString());
85  int rows = model.rowCount({});
86  for (int row = 0; row < rows; ++row) {
87  QModelIndex index = model.index(row, 0, {});
88  if (model.data(index, TransactionTableModel::TxHashRole) == hash) {
89  return index;
90  }
91  }
92  return {};
93 }
94 
96 void BumpFee(TransactionView& view, const uint256& txid, bool expectDisabled, std::string expectError, bool cancel)
97 {
98  QTableView* table = view.findChild<QTableView*>("transactionView");
99  QModelIndex index = FindTx(*table->selectionModel()->model(), txid);
100  QVERIFY2(index.isValid(), "Could not find BumpFee txid");
101 
102  // Select row in table, invoke context menu, and make sure bumpfee action is
103  // enabled or disabled as expected.
104  QAction* action = view.findChild<QAction*>("bumpFeeAction");
105  table->selectionModel()->select(index, QItemSelectionModel::ClearAndSelect | QItemSelectionModel::Rows);
106  action->setEnabled(expectDisabled);
107  table->customContextMenuRequested({});
108  QCOMPARE(action->isEnabled(), !expectDisabled);
109 
110  action->setEnabled(true);
111  QString text;
112  if (expectError.empty()) {
113  ConfirmSend(&text, cancel);
114  } else {
115  ConfirmMessage(&text);
116  }
117  action->trigger();
118  QVERIFY(text.indexOf(QString::fromStdString(expectError)) != -1);
119 }
120 
122 //
123 // Test widgets can be debugged interactively calling show() on them and
124 // manually running the event loop, e.g.:
125 //
126 // sendCoinsDialog.show();
127 // QEventLoop().exec();
128 //
129 // This also requires overriding the default minimal Qt platform:
130 //
131 // QT_QPA_PLATFORM=xcb src/qt/test/test_bitcoin-qt # Linux
132 // QT_QPA_PLATFORM=windows src/qt/test/test_bitcoin-qt # Windows
133 // QT_QPA_PLATFORM=cocoa src/qt/test/test_bitcoin-qt # macOS
134 void TestGUI(interfaces::Node& node)
135 {
136  // Set up wallet and chain with 105 blocks (5 mature blocks for spending).
137  TestChain100Setup test;
138  for (int i = 0; i < 5; ++i) {
140  }
141  auto wallet_client = interfaces::MakeWalletClient(*test.m_node.chain, *Assert(test.m_node.args));
142  test.m_node.wallet_client = wallet_client.get();
143  node.setContext(&test.m_node);
144  std::shared_ptr<CWallet> wallet = std::make_shared<CWallet>(node.context()->chain.get(), "", CreateMockWalletDatabase());
145  wallet->LoadWallet();
146  {
147  auto spk_man = wallet->GetOrCreateLegacyScriptPubKeyMan();
148  LOCK2(wallet->cs_wallet, spk_man->cs_KeyStore);
149  wallet->SetAddressBook(GetDestinationForKey(test.coinbaseKey.GetPubKey(), wallet->m_default_address_type), "", "receive");
150  spk_man->AddKeyPubKey(test.coinbaseKey, test.coinbaseKey.GetPubKey());
151  wallet->SetLastBlockProcessed(105, node.context()->chainman->ActiveChain().Tip()->GetBlockHash());
152  }
153  {
154  WalletRescanReserver reserver(*wallet);
155  reserver.reserve();
156  CWallet::ScanResult result = wallet->ScanForWalletTransactions(Params().GetConsensus().hashGenesisBlock, 0 /* block height */, {} /* max height */, reserver, true /* fUpdate */);
157  QCOMPARE(result.status, CWallet::ScanResult::SUCCESS);
158  QCOMPARE(result.last_scanned_block, node.context()->chainman->ActiveChain().Tip()->GetBlockHash());
159  QVERIFY(result.last_failed_block.IsNull());
160  }
161  wallet->SetBroadcastTransactions(true);
162 
163  // Create widgets for sending coins and listing transactions.
164  std::unique_ptr<const PlatformStyle> platformStyle(PlatformStyle::instantiate("other"));
165  SendCoinsDialog sendCoinsDialog(platformStyle.get());
166  TransactionView transactionView(platformStyle.get());
167  OptionsModel optionsModel;
168  ClientModel clientModel(node, &optionsModel);
169  WalletContext& context = *node.walletClient().context();
170  AddWallet(context, wallet);
171  WalletModel walletModel(interfaces::MakeWallet(context, wallet), clientModel, platformStyle.get());
172  RemoveWallet(context, wallet, /* load_on_start= */ std::nullopt);
173  sendCoinsDialog.setModel(&walletModel);
174  transactionView.setModel(&walletModel);
175 
176  {
177  // Check balance in send dialog
178  QLabel* balanceLabel = sendCoinsDialog.findChild<QLabel*>("labelBalance");
179  QString balanceText = balanceLabel->text();
180  int unit = walletModel.getOptionsModel()->getDisplayUnit();
181  CAmount balance = walletModel.wallet().getBalance();
182  QString balanceComparison = BitcoinUnits::formatWithUnit(unit, balance, false, BitcoinUnits::SeparatorStyle::ALWAYS);
183  QCOMPARE(balanceText, balanceComparison);
184  }
185 
186  // Send two transactions, and verify they are added to transaction list.
187  TransactionTableModel* transactionTableModel = walletModel.getTransactionTableModel();
188  QCOMPARE(transactionTableModel->rowCount({}), 105);
189  uint256 txid1 = SendCoins(*wallet.get(), sendCoinsDialog, PKHash(), 5 * COIN, false /* rbf */);
190  uint256 txid2 = SendCoins(*wallet.get(), sendCoinsDialog, PKHash(), 10 * COIN, true /* rbf */);
191  QCOMPARE(transactionTableModel->rowCount({}), 107);
192  QVERIFY(FindTx(*transactionTableModel, txid1).isValid());
193  QVERIFY(FindTx(*transactionTableModel, txid2).isValid());
194 
195  // Call bumpfee. Test disabled, canceled, enabled, then failing cases.
196  BumpFee(transactionView, txid1, true /* expect disabled */, "not BIP 125 replaceable" /* expected error */, false /* cancel */);
197  BumpFee(transactionView, txid2, false /* expect disabled */, {} /* expected error */, true /* cancel */);
198  BumpFee(transactionView, txid2, false /* expect disabled */, {} /* expected error */, false /* cancel */);
199  BumpFee(transactionView, txid2, true /* expect disabled */, "already bumped" /* expected error */, false /* cancel */);
200 
201  // Check current balance on OverviewPage
202  OverviewPage overviewPage(platformStyle.get());
203  overviewPage.setWalletModel(&walletModel);
204  QLabel* balanceLabel = overviewPage.findChild<QLabel*>("labelBalance");
205  QString balanceText = balanceLabel->text().trimmed();
206  int unit = walletModel.getOptionsModel()->getDisplayUnit();
207  CAmount balance = walletModel.wallet().getBalance();
208  QString balanceComparison = BitcoinUnits::formatWithUnit(unit, balance, false, BitcoinUnits::SeparatorStyle::ALWAYS);
209  QCOMPARE(balanceText, balanceComparison);
210 
211  // Check Request Payment button
212  ReceiveCoinsDialog receiveCoinsDialog(platformStyle.get());
213  receiveCoinsDialog.setModel(&walletModel);
214  RecentRequestsTableModel* requestTableModel = walletModel.getRecentRequestsTableModel();
215 
216  // Label input
217  QLineEdit* labelInput = receiveCoinsDialog.findChild<QLineEdit*>("reqLabel");
218  labelInput->setText("TEST_LABEL_1");
219 
220  // Amount input
221  BitcoinAmountField* amountInput = receiveCoinsDialog.findChild<BitcoinAmountField*>("reqAmount");
222  amountInput->setValue(1);
223 
224  // Message input
225  QLineEdit* messageInput = receiveCoinsDialog.findChild<QLineEdit*>("reqMessage");
226  messageInput->setText("TEST_MESSAGE_1");
227  int initialRowCount = requestTableModel->rowCount({});
228  QPushButton* requestPaymentButton = receiveCoinsDialog.findChild<QPushButton*>("receiveButton");
229  requestPaymentButton->click();
230  QString address;
231  for (QWidget* widget : QApplication::topLevelWidgets()) {
232  if (widget->inherits("ReceiveRequestDialog")) {
233  ReceiveRequestDialog* receiveRequestDialog = qobject_cast<ReceiveRequestDialog*>(widget);
234  QCOMPARE(receiveRequestDialog->QObject::findChild<QLabel*>("payment_header")->text(), QString("Payment information"));
235  QCOMPARE(receiveRequestDialog->QObject::findChild<QLabel*>("uri_tag")->text(), QString("URI:"));
236  QString uri = receiveRequestDialog->QObject::findChild<QLabel*>("uri_content")->text();
237  QCOMPARE(uri.count("bitcoin:"), 2);
238  QCOMPARE(receiveRequestDialog->QObject::findChild<QLabel*>("address_tag")->text(), QString("Address:"));
239  QVERIFY(address.isEmpty());
240  address = receiveRequestDialog->QObject::findChild<QLabel*>("address_content")->text();
241  QVERIFY(!address.isEmpty());
242 
243  QCOMPARE(uri.count("amount=0.00000001"), 2);
244  QCOMPARE(receiveRequestDialog->QObject::findChild<QLabel*>("amount_tag")->text(), QString("Amount:"));
245  QCOMPARE(receiveRequestDialog->QObject::findChild<QLabel*>("amount_content")->text(), QString::fromStdString("0.00000001 " + CURRENCY_UNIT));
246 
247  QCOMPARE(uri.count("label=TEST_LABEL_1"), 2);
248  QCOMPARE(receiveRequestDialog->QObject::findChild<QLabel*>("label_tag")->text(), QString("Label:"));
249  QCOMPARE(receiveRequestDialog->QObject::findChild<QLabel*>("label_content")->text(), QString("TEST_LABEL_1"));
250 
251  QCOMPARE(uri.count("message=TEST_MESSAGE_1"), 2);
252  QCOMPARE(receiveRequestDialog->QObject::findChild<QLabel*>("message_tag")->text(), QString("Message:"));
253  QCOMPARE(receiveRequestDialog->QObject::findChild<QLabel*>("message_content")->text(), QString("TEST_MESSAGE_1"));
254  }
255  }
256 
257  // Clear button
258  QPushButton* clearButton = receiveCoinsDialog.findChild<QPushButton*>("clearButton");
259  clearButton->click();
260  QCOMPARE(labelInput->text(), QString(""));
261  QCOMPARE(amountInput->value(), CAmount(0));
262  QCOMPARE(messageInput->text(), QString(""));
263 
264  // Check addition to history
265  int currentRowCount = requestTableModel->rowCount({});
266  QCOMPARE(currentRowCount, initialRowCount+1);
267 
268  // Check addition to wallet
269  std::vector<std::string> requests = walletModel.wallet().getAddressReceiveRequests();
270  QCOMPARE(requests.size(), size_t{1});
271  RecentRequestEntry entry;
272  CDataStream{MakeUCharSpan(requests[0]), SER_DISK, CLIENT_VERSION} >> entry;
273  QCOMPARE(entry.nVersion, int{1});
274  QCOMPARE(entry.id, int64_t{1});
275  QVERIFY(entry.date.isValid());
276  QCOMPARE(entry.recipient.address, address);
277  QCOMPARE(entry.recipient.label, QString{"TEST_LABEL_1"});
278  QCOMPARE(entry.recipient.amount, CAmount{1});
279  QCOMPARE(entry.recipient.message, QString{"TEST_MESSAGE_1"});
280  QCOMPARE(entry.recipient.sPaymentRequest, std::string{});
281  QCOMPARE(entry.recipient.authenticatedMerchant, QString{});
282 
283  // Check Remove button
284  QTableView* table = receiveCoinsDialog.findChild<QTableView*>("recentRequestsView");
285  table->selectRow(currentRowCount-1);
286  QPushButton* removeRequestButton = receiveCoinsDialog.findChild<QPushButton*>("removeRequestButton");
287  removeRequestButton->click();
288  QCOMPARE(requestTableModel->rowCount({}), currentRowCount-1);
289 
290  // Check removal from wallet
291  QCOMPARE(walletModel.wallet().getAddressReceiveRequests().size(), size_t{0});
292 }
293 
294 } // namespace
295 
297 {
298 #ifdef Q_OS_MAC
299  if (QApplication::platformName() == "minimal") {
300  // Disable for mac on "minimal" platform to avoid crashes inside the Qt
301  // framework when it tries to look up unimplemented cocoa functions,
302  // and fails to handle returned nulls
303  // (https://bugreports.qt.io/browse/QTBUG-49686).
304  QWARN("Skipping WalletTests on mac build with 'minimal' platform set due to Qt bugs. To run AppTests, invoke "
305  "with 'QT_QPA_PLATFORM=cocoa test_bitcoin-qt' on mac, or else use a linux or windows build.");
306  return;
307  }
308 #endif
309  TestGUI(m_node);
310 }
RemoveWallet
bool RemoveWallet(WalletContext &context, const std::shared_ptr< CWallet > &wallet, std::optional< bool > load_on_start, std::vector< bilingual_str > &warnings)
Definition: wallet.cpp:116
SendCoinsRecipient::amount
CAmount amount
Definition: sendcoinsrecipient.h:33
CWallet::ScanResult::last_failed_block
uint256 last_failed_block
Height of the most recent block that could not be scanned due to read errors or pruning.
Definition: wallet.h:527
LOCK2
#define LOCK2(cs1, cs2)
Definition: sync.h:227
TransactionView
Widget showing the transaction list for a wallet, including a filter row.
Definition: transactionview.h:32
RecentRequestEntry::recipient
SendCoinsRecipient recipient
Definition: recentrequeststablemodel.h:27
transactiontablemodel.h
assert
assert(!tx.IsCoinBase())
ReceiveCoinsDialog
Dialog for requesting payment of bitcoins.
Definition: receivecoinsdialog.h:30
RecentRequestEntry::date
QDateTime date
Definition: recentrequeststablemodel.h:26
SER_DISK
@ SER_DISK
Definition: serialize.h:139
wallettests.h
wallet.h
WalletModel
Interface to Bitcoin wallet from Qt view code.
Definition: walletmodel.h:51
BitcoinUnits::formatWithUnit
static QString formatWithUnit(int unit, const CAmount &amount, bool plussign=false, SeparatorStyle separators=SeparatorStyle::STANDARD)
Format as string (with unit)
Definition: bitcoinunits.cpp:148
NodeContext::args
ArgsManager * args
Definition: context.h:49
key_io.h
setup_common.h
MakeUCharSpan
constexpr auto MakeUCharSpan(V &&v) -> decltype(UCharSpanCast(MakeSpan(std::forward< V >(v))))
Like MakeSpan, but for (const) unsigned char member types only.
Definition: span.h:249
sendcoinsdialog.h
walletmodel.h
CWallet::ScanResult::last_scanned_block
uint256 last_scanned_block
Hash and height of most recent block that was successfully scanned.
Definition: wallet.h:520
SendCoinsRecipient::label
QString label
Definition: sendcoinsrecipient.h:32
RecentRequestsTableModel::rowCount
int rowCount(const QModelIndex &parent) const override
Definition: recentrequeststablemodel.cpp:42
OverviewPage
Overview ("home") page widget.
Definition: overviewpage.h:28
SendCoinsRecipient::authenticatedMerchant
QString authenticatedMerchant
Definition: sendcoinsrecipient.h:40
wallet
Definition: interfaces.cpp:50
GetDestinationForKey
CTxDestination GetDestinationForKey(const CPubKey &key, OutputType type)
Get a destination of the requested type (if possible) to the specified key.
Definition: outputtype.cpp:49
chain.h
interfaces::MakeWalletClient
std::unique_ptr< WalletClient > MakeWalletClient(Chain &chain, ArgsManager &args)
Return implementation of ChainClient interface for a wallet client.
Definition: dummywallet.cpp:69
NodeContext::chain
std::unique_ptr< interfaces::Chain > chain
Definition: context.h:50
Assert
#define Assert(val)
Identity function.
Definition: check.h:57
overviewpage.h
balance
static CAmount balance
Definition: coinselector_tests.cpp:35
AddWallet
bool AddWallet(WalletContext &context, const std::shared_ptr< CWallet > &wallet)
Definition: wallet.cpp:104
OptionsModel
Interface from Qt to configuration data structure for Bitcoin client.
Definition: optionsmodel.h:39
ChangeType
ChangeType
General change type (added, updated, removed).
Definition: ui_change_type.h:9
CURRENCY_UNIT
const std::string CURRENCY_UNIT
Definition: feerate.h:14
WalletTests::walletTests
void walletTests()
Definition: wallettests.cpp:296
CTxDestination
std::variant< CNoDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessV1Taproot, WitnessUnknown > CTxDestination
A txout script template with a specific destination.
Definition: standard.h:157
GetScriptForRawPubKey
CScript GetScriptForRawPubKey(const CPubKey &pubKey)
Generate a P2PK script for the given pubkey.
Definition: standard.cpp:356
sendcoinsentry.h
util.h
BitcoinAmountField::value
qint64 value
Definition: bitcoinamountfield.h:26
node.h
RecentRequestsTableModel
Model for list of recently generated payment requests / bitcoin: URIs.
Definition: recentrequeststablemodel.h:52
recentrequeststablemodel.h
RecentRequestEntry::nVersion
int nVersion
Definition: recentrequeststablemodel.h:24
TransactionTableModel::rowCount
int rowCount(const QModelIndex &parent) const override
Definition: transactiontablemodel.cpp:297
CWallet::ScanResult::status
enum CWallet::ScanResult::@17 status
CAmount
int64_t CAmount
Amount in satoshis (Can be negative)
Definition: amount.h:12
QValidatedLineEdit
Line edit that can be marked as "invalid" to show input validation feedback.
Definition: qvalidatedlineedit.h:13
WalletRescanReserver
RAII object to check and reserve a wallet rescan.
Definition: wallet.h:889
ConfirmMessage
void ConfirmMessage(QString *text, int msec)
Press "Ok" button in message box dialog.
Definition: util.cpp:12
SendCoinsDialog
Dialog for sending bitcoins.
Definition: sendcoinsdialog.h:31
TestChain100Setup
Testing fixture that pre-creates a 100-block REGTEST-mode block chain.
Definition: setup_common.h:116
base_blob::ToString
std::string ToString() const
Definition: uint256.cpp:64
uint256
256-bit opaque blob.
Definition: uint256.h:124
CWallet::ScanResult::SUCCESS
@ SUCCESS
Definition: wallet.h:515
CWallet::ScanResult
Definition: wallet.h:514
CKey::GetPubKey
CPubKey GetPubKey() const
Compute the public key from a private key.
Definition: key.cpp:187
TestChain100Setup::CreateAndProcessBlock
CBlock CreateAndProcessBlock(const std::vector< CMutableTransaction > &txns, const CScript &scriptPubKey, CChainState *chainstate=nullptr)
Create a new block with just given transactions, coinbase paying to scriptPubKey, and try to add it t...
Definition: setup_common.cpp:258
ReceiveRequestDialog
Definition: receiverequestdialog.h:18
interfaces::MakeWallet
std::unique_ptr< Wallet > MakeWallet(const std::shared_ptr< CWallet > &wallet)
Definition: dummywallet.cpp:64
PlatformStyle::instantiate
static const PlatformStyle * instantiate(const QString &platformId)
Get style associated with provided platform name, or 0 if not known.
Definition: platformstyle.cpp:124
interfaces::Node
Top-level interface for a bitcoin node (bitcoind process).
Definition: node.h:54
qvalidatedlineedit.h
NodeContext::wallet_client
interfaces::WalletClient * wallet_client
Reference to chain client that should used to load or create wallets opened by the gui.
Definition: context.h:55
BitcoinUnits::SeparatorStyle::ALWAYS
@ ALWAYS
platformstyle.h
BitcoinAmountField::setValue
void setValue(const CAmount &value)
Definition: bitcoinamountfield.cpp:298
bitcoinamountfield.h
PKHash
Definition: standard.h:79
ClientModel
Model for Bitcoin network client.
Definition: clientmodel.h:47
TransactionTableModel
UI model for the transaction table of a wallet.
Definition: transactiontablemodel.h:26
BasicTestingSetup::m_node
NodeContext m_node
Definition: setup_common.h:78
base_blob::IsNull
bool IsNull() const
Definition: uint256.h:31
receivecoinsdialog.h
RecentRequestEntry::id
int64_t id
Definition: recentrequeststablemodel.h:25
SendCoinsRecipient::sPaymentRequest
std::string sPaymentRequest
Definition: sendcoinsrecipient.h:38
SendCoinsRecipient::address
QString address
Definition: sendcoinsrecipient.h:31
WalletTests::m_node
interfaces::Node & m_node
Definition: wallettests.h:19
CreateMockWalletDatabase
std::unique_ptr< WalletDatabase > CreateMockWalletDatabase()
Return object for accessing temporary in-memory database.
Definition: walletdb.cpp:1173
CWallet
A CWallet maintains a set of transactions and balances, and provides the ability to create new transa...
Definition: wallet.h:228
CLIENT_VERSION
static const int CLIENT_VERSION
bitcoind-res.rc includes this file, but it cannot cope with real c++ code.
Definition: clientversion.h:33
SendCoinsDialog::setModel
void setModel(WalletModel *model)
Definition: sendcoinsdialog.cpp:145
Params
const CChainParams & Params()
Return the currently selected parameters.
Definition: chainparams.cpp:559
TransactionTableModel::TxHashRole
@ TxHashRole
Transaction hash.
Definition: transactiontablemodel.h:64
TestChain100Setup::coinbaseKey
CKey coinbaseKey
Definition: setup_common.h:160
node
Definition: interfaces.cpp:68
COIN
static const CAmount COIN
Definition: amount.h:14
CDataStream
Double ended buffer combining vector and stream-like interfaces.
Definition: streams.h:204
transactionview.h
SendCoinsEntry
A single entry in the dialog for sending bitcoins.
Definition: sendcoinsentry.h:28
BitcoinAmountField
Widget for entering bitcoin amounts.
Definition: bitcoinamountfield.h:20
optionsmodel.h
receiverequestdialog.h
WalletContext
WalletContext struct containing references to state shared between CWallet instances,...
Definition: context.h:34
EncodeDestination
std::string EncodeDestination(const CTxDestination &dest)
Definition: key_io.cpp:256
clientmodel.h
RecentRequestEntry
Definition: recentrequeststablemodel.h:18
SendCoinsRecipient::message
QString message
Definition: sendcoinsrecipient.h:35