diff options
| author | mtg0001 <106211915+mtg0001@users.noreply.github.com> | 2026-08-03 10:43:42 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-08-03 10:43:42 -0300 |
| commit | 57441faffb02f4f2eea37d31b29728de25f18bef (patch) | |
| tree | edade03dddf472790e8bc7e3bc52d3e8f8eac87b /src/main.h | |
| parent | 5e37647023463cec4331dc48dc360ba60b22c888 (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.h | 31 |
1 files changed, 31 insertions, 0 deletions
| @@ -217,6 +217,37 @@ extern CCriticalSection cs_mapTransactions; | |||
| 217 | bool ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv); | 217 | bool ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv); |
| 218 | bool SendMessages(CNode* pto); | 218 | bool SendMessages(CNode* pto); |
| 219 | int64 GetBalance(); | 219 | int64 GetBalance(); |
| 220 | struct 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 | }; | ||
| 250 | WalletRecoveryAudit GetWalletRecoveryAudit(); | ||
| 220 | bool CreateTransaction(CScript scriptPubKey, int64 nValue, CWalletTx& txNew, int64& nFeeRequiredRet); | 251 | bool CreateTransaction(CScript scriptPubKey, int64 nValue, CWalletTx& txNew, int64& nFeeRequiredRet); |
| 221 | bool CommitTransactionSpent(const CWalletTx& wtxNew); | 252 | bool CommitTransactionSpent(const CWalletTx& wtxNew); |
| 222 | bool SendMoney(CScript scriptPubKey, int64 nValue, CWalletTx& wtxNew); | 253 | bool SendMoney(CScript scriptPubKey, int64 nValue, CWalletTx& wtxNew); |