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. The two line-number columns refer to before and after.
src/qt/walletmodel.h
CHANGED
|
@@ -13,9 +13,11 @@
|
|
|
13
13
|
#include <primitives/transaction_identifier.h>
|
|
14
14
|
#include <support/allocators/secure.h>
|
|
15
15
|
|
|
16
|
+
#include <cstdint>
|
|
16
17
|
#include <vector>
|
|
17
18
|
|
|
18
19
|
#include <QObject>
|
|
20
|
+
#include <QThread>
|
|
19
21
|
|
|
20
22
|
enum class OutputType;
|
|
21
23
|
|
|
@@ -155,6 +157,10 @@ public:
|
|
|
155
157
|
// Otherwise, uses the wallet's cached available balance.
|
|
156
158
|
CAmount getAvailableBalance(const wallet::CCoinControl* control);
|
|
157
159
|
|
|
160
|
+
bool invalidateSweepRequests();
|
|
161
|
+
uint64_t requestSweep(SecureString private_key, CTxDestination destination, bool broadcast,
|
|
162
|
+
std::optional<Txid> expected_txid = std::nullopt);
|
|
163
|
+
|
|
158
164
|
private:
|
|
159
165
|
std::unique_ptr<interfaces::Wallet> m_wallet;
|
|
160
166
|
std::unique_ptr<interfaces::Handler> m_handler_unload;
|
|
@@ -166,6 +172,10 @@ private:
|
|
|
166
172
|
ClientModel* m_client_model;
|
|
167
173
|
interfaces::Node& m_node;
|
|
168
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;
|
|
169
179
|
bool fForceCheckBalanceChanged{false};
|
|
170
180
|
|
|
171
181
|
// Wallet has an options model for wallet-specific options
|
|
@@ -214,6 +224,10 @@ Q_SIGNALS:
|
|
|
214
224
|
|
|
215
225
|
// Notify that there are now keys in the keypool
|
|
216
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);
|
|
217
231
|
|
|
218
232
|
void timerTimeout();
|
|
219
233
|
|