v31.1-roots.1 · Commit 6: [PATCH 06/17] feat(wallet): preserve Roots signing and spend controls on v31
src/qt/walletmodel.h
Before: src/qt/walletmodel.h · After: src/qt/walletmodel.h
File metadata
index ced057574b82c173e790f6820db361361bbd85ea..e974e59b4957582993fef38656af3f7e8c9834f0 100644
Download original patch · Release notes
Diff rows 1–41 of 41. Line numbers refer to the original before/after files.
+ Added− RemovedUnmarked lines are context.
Scroll the code area horizontally to read long lines. Before is on the left; after is on the right. Unified view fits narrow screens more easily.
src/qt/walletmodel.h
CHANGED
|
@@ -13,9 +13,11 @@
|
|
| 13 |
#include <primitives/transaction_identifier.h>
|
| 14 |
#include <support/allocators/secure.h>
|
| 15 |
|
|
|
|
| 16 |
#include <vector>
|
| 17 |
|
| 18 |
#include <QObject>
|
|
|
|
| 19 |
|
| 20 |
enum class OutputType;
|
| 21 |
|
|
@@ -155,6 +157,10 @@ public:
|
|
| 155 |
// Otherwise, uses the wallet's cached available balance.
|
| 156 |
CAmount getAvailableBalance(const wallet::CCoinControl* control);
|
| 157 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 158 |
private:
|
| 159 |
std::unique_ptr<interfaces::Wallet> m_wallet;
|
| 160 |
std::unique_ptr<interfaces::Handler> m_handler_unload;
|
|
@@ -166,6 +172,10 @@ private:
|
|
| 166 |
ClientModel* m_client_model;
|
| 167 |
interfaces::Node& m_node;
|
| 168 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 169 |
bool fForceCheckBalanceChanged{false};
|
| 170 |
|
| 171 |
// Wallet has an options model for wallet-specific options
|
|
@@ -214,6 +224,10 @@ Q_SIGNALS:
|
|
| 214 |
|
| 215 |
// Notify that there are now keys in the keypool
|
| 216 |
void canGetAddressesChanged();
|
|
|
|
|
|
|
|
|
|
|
|
|
| 217 |
|
| 218 |
void timerTimeout();
|
| 219 |
|
|
|
|
| 13 |
#include <primitives/transaction_identifier.h>
|
| 14 |
#include <support/allocators/secure.h>
|
| 15 |
|
| 16 |
+
#include <cstdint>
|
| 17 |
#include <vector>
|
| 18 |
|
| 19 |
#include <QObject>
|
| 20 |
+
#include <QThread>
|
| 21 |
|
| 22 |
enum class OutputType;
|
| 23 |
|
|
|
|
| 157 |
// Otherwise, uses the wallet's cached available balance.
|
| 158 |
CAmount getAvailableBalance(const wallet::CCoinControl* control);
|
| 159 |
|
| 160 |
+
bool invalidateSweepRequests();
|
| 161 |
+
uint64_t requestSweep(SecureString private_key, CTxDestination destination, bool broadcast,
|
| 162 |
+
std::optional<Txid> expected_txid = std::nullopt);
|
| 163 |
+
|
| 164 |
private:
|
| 165 |
std::unique_ptr<interfaces::Wallet> m_wallet;
|
| 166 |
std::unique_ptr<interfaces::Handler> m_handler_unload;
|
|
|
|
| 172 |
ClientModel* m_client_model;
|
| 173 |
interfaces::Node& m_node;
|
| 174 |
|
| 175 |
+
uint64_t m_sweep_request_generation{0};
|
| 176 |
+
std::shared_ptr<interfaces::SweepAuthorization> m_sweep_authorization;
|
| 177 |
+
QObject m_sweep_context;
|
| 178 |
+
QThread m_sweep_thread;
|
| 179 |
bool fForceCheckBalanceChanged{false};
|
| 180 |
|
| 181 |
// Wallet has an options model for wallet-specific options
|
|
|
|
| 224 |
|
| 225 |
// Notify that there are now keys in the keypool
|
| 226 |
void canGetAddressesChanged();
|
| 227 |
+
void walletStateChanged();
|
| 228 |
+
void sweepRequestInvalidated(uint64_t generation);
|
| 229 |
+
void sweepFinished(uint64_t generation, bool broadcast, bool success, const QString& error,
|
| 230 |
+
qint64 amount, qint64 fee, quint64 inputs, qint64 vsize, bool rbf, const QString& txid);
|
| 231 |
|
| 232 |
void timerTimeout();
|
| 233 |
|