27#include <QApplication>
53 dialog->findChild<QLineEdit*>(
"labelEdit")->setText(label);
79 const std::shared_ptr<CWallet>
wallet = std::make_shared<CWallet>(
node.context()->chain.get(),
"", CreateMockableWalletDatabase());
80 wallet->SetWalletFlag(WALLET_FLAG_DESCRIPTORS);
83 wallet->SetupDescriptorScriptPubKeyMans();
128 QVERIFY(optionsModel.Init(error));
131 AddWallet(context,
wallet);
133 RemoveWallet(context,
wallet, std::nullopt);
145 "Address \"%1\" already exists as a receiving address with label "
146 "\"%2\" and so cannot be added as a sending address."
154 "The entered address \"%1\" is already in the address book with "
216 if (QApplication::platformName() ==
"minimal") {
221 qWarning() <<
"Skipping AddressBookTests on mac build with 'minimal' platform set due to Qt bugs. To run AppTests, invoke "
222 "with 'QT_QPA_PLATFORM=cocoa test_bitcoin-qt' on mac, or else use a linux or windows build.";
std::variant< CNoDestination, PubKeyDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessV1Taproot, PayToAnchor, WitnessUnknown > CTxDestination
A txout script categorized into standard templates.
#define Assert(val)
Identity function.
Widget that shows a list of sending or receiving addresses.
@ ForEditing
Open address book for editing.
void setModel(AddressTableModel *model)
interfaces::Node & m_node
CPubKey GetPubKey() const
Compute the public key from a private key.
Model for Bitcoin network client.
Dialog for editing an address and associated information.
Interface from Qt to configuration data structure for Bitcoin client.
Line edit that can be marked as "invalid" to show input validation feedback.
Interface to Bitcoin wallet from Qt view code.
Top-level interface for a bitcoin node (bitcoind process).
A CWallet maintains a set of transactions and balances, and provides the ability to create new transa...
CKey GenerateRandomKey(bool compressed) noexcept
std::string EncodeDestination(const CTxDestination &dest)
std::unique_ptr< WalletLoader > MakeWalletLoader(Chain &chain, ArgsManager &args)
Return implementation of ChainClient interface for a wallet loader.
std::unique_ptr< Wallet > MakeWallet(wallet::WalletContext &context, const std::shared_ptr< wallet::CWallet > &wallet)
Return implementation of Wallet interface.
std::unique_ptr< WalletDatabase > CreateMockableWalletDatabase(MockableData records)
bool AddWallet(WalletContext &context, const std::shared_ptr< CWallet > &wallet)
@ WALLET_FLAG_DESCRIPTORS
Indicate that this wallet supports DescriptorScriptPubKeyMan.
bool RemoveWallet(WalletContext &context, const std::shared_ptr< CWallet > &wallet, std::optional< bool > load_on_start, std::vector< bilingual_str > &warnings)
void ConfirmMessage(QString *text, std::chrono::milliseconds msec)
Press "Ok" button in message box dialog.
Testing fixture that pre-creates a 100-block REGTEST-mode block chain.
interfaces::WalletLoader * wallet_loader
std::unique_ptr< interfaces::Chain > chain
WalletContext struct containing references to state shared between CWallet instances,...
constexpr auto Ticks(Dur2 d)
Helper to count the seconds of a duration/time_point.