upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src/main.h
diff options
context:
space:
mode:
authormtg0001 <106211915+mtg0001@users.noreply.github.com>2026-08-03 10:43:42 -0300
committerGitHub <noreply@github.com>2026-08-03 10:43:42 -0300
commit57441faffb02f4f2eea37d31b29728de25f18bef (patch)
treeedade03dddf472790e8bc7e3bc52d3e8f8eac87b /src/main.h
parent5e37647023463cec4331dc48dc360ba60b22c888 (diff)
Add wallet recovery balance audit (#117)
Co-authored-by: Gilcimar Duarte <ti@gpm.infra>
Diffstat (limited to 'src/main.h')
-rw-r--r--src/main.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/main.h b/src/main.h
index 768f1c7..4886f55 100644
--- a/src/main.h
+++ b/src/main.h
@@ -217,6 +217,37 @@ extern CCriticalSection cs_mapTransactions;
217bool ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv); 217bool ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv);
218bool SendMessages(CNode* pto); 218bool SendMessages(CNode* pto);
219int64 GetBalance(); 219int64 GetBalance();
220struct WalletRecoveryAudit
221{
222 bool fHaveSeed;
223 bool fDeriveComplete;
224 unsigned int nDerivedKnown;
225 int nRecoverableTx;
226 int nLegacyTx;
227 int nRecoverableImmatureTx;
228 int nLegacyImmatureTx;
229 int64 nRecoverableCredit;
230 int64 nLegacyCredit;
231 int64 nRecoverableImmatureCredit;
232 int64 nLegacyImmatureCredit;
233 string strDeriveError;
234
235 WalletRecoveryAudit()
236 {
237 fHaveSeed = false;
238 fDeriveComplete = true;
239 nDerivedKnown = 0;
240 nRecoverableTx = 0;
241 nLegacyTx = 0;
242 nRecoverableImmatureTx = 0;
243 nLegacyImmatureTx = 0;
244 nRecoverableCredit = 0;
245 nLegacyCredit = 0;
246 nRecoverableImmatureCredit = 0;
247 nLegacyImmatureCredit = 0;
248 }
249};
250WalletRecoveryAudit GetWalletRecoveryAudit();
220bool CreateTransaction(CScript scriptPubKey, int64 nValue, CWalletTx& txNew, int64& nFeeRequiredRet); 251bool CreateTransaction(CScript scriptPubKey, int64 nValue, CWalletTx& txNew, int64& nFeeRequiredRet);
221bool CommitTransactionSpent(const CWalletTx& wtxNew); 252bool CommitTransactionSpent(const CWalletTx& wtxNew);
222bool SendMoney(CScript scriptPubKey, int64 nValue, CWalletTx& wtxNew); 253bool SendMoney(CScript scriptPubKey, int64 nValue, CWalletTx& wtxNew);