diff options
| author | bitflash-maintainer <noreply@bitflash.invalid> | 2026-09-05 22:46:52 +0000 |
|---|---|---|
| committer | bitflash-maintainer <noreply@bitflash.invalid> | 2026-09-05 22:46:52 +0000 |
| commit | ceae3d076b5ad11ee84729ae43f14e9312896646 (patch) | |
| tree | 7e9132aa871fdc01cb95268d2f5ea3bb11853ddf /src/walletcmd.h | |
| parent | be63e83d79e7e00e6b8ca889a70e6a19886aa1d8 (diff) | |
| parent | 66e0b9158d050c46b1ff2509faeee3f4573cac1c (diff) | |
Bring main onto the line this project actually ships
main had drifted to a history with no ancestor in common with the tree we
build and deploy. It sat at be63e83 (2026-08-09) with 28 commits; the shipped
line, deploy/soak-2026-08-21, had 383. The two shared nothing -- git
merge-base returns no result at all -- so anyone cloning this repository
landed on a default branch that was neither current nor related to the
running node.
The 28 commits on main were audited before this merge: every one is already
present in the tree by content, including the two that are hardest to see
because they were rewritten afterwards -- the payout reorg-safety work
(PayoutBlockStillOnChain, since evolved to re-check on every retry rather
than once at maturity) and the nostr relay certificate verification
(SSL_set1_host, now with a Windows root-store path). Nothing on main is lost
by this merge.
Recorded as a merge rather than a force-push: main only ever moves forward,
its old history stays reachable as the first parent, and this is revertible.
The tree is taken wholesale from the merged branch, so main's content is now
exactly what was built and tested.
What this brings onto main:
- compactblock: BIP152-style compact block relay ported from upstream 1.2.23,
primitives and unit test only, with the RAND_bytes failure path closed and
the reconstruction allocation bounded.
- upstream/main 17741d9: isolated testnet parameters and genesis, optional
2 MB large pages for RandomX. Mainnet genesis verified byte-identical
through upstream's BuildGenesisBlock() refactor.
- deploy: every image built on bookworm so binaries run on Debian 12, and the
container build now honours the RandomX and libsecp256k1 pins it had been
silently ignoring since before 1.2.15.
Gates at this tree: 15/15 selftests, compactblock's 17 checks, consensus
constants unchanged against e4f898c apart from the pre-existing
MAX_BLOCK_SIZE_GEN, mainnet genesis intact, money-log check ok.
Diffstat (limited to 'src/walletcmd.h')
| -rw-r--r-- | src/walletcmd.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/walletcmd.h b/src/walletcmd.h index 04d3fb7..7013d44 100644 --- a/src/walletcmd.h +++ b/src/walletcmd.h | |||
| @@ -7,7 +7,9 @@ | |||
| 7 | #ifndef BITFLASH_WALLETCMD_H | 7 | #ifndef BITFLASH_WALLETCMD_H |
| 8 | #define BITFLASH_WALLETCMD_H | 8 | #define BITFLASH_WALLETCMD_H |
| 9 | 9 | ||
| 10 | #include <map> | ||
| 10 | #include <string> | 11 | #include <string> |
| 12 | #include <vector> | ||
| 11 | 13 | ||
| 12 | // Create a phrase for a wallet that does not have one, install the seed, and | 14 | // Create a phrase for a wallet that does not have one, install the seed, and |
| 13 | // show the words once. Refuses if a phrase already exists. Returns 0 on success. | 15 | // show the words once. Refuses if a phrase already exists. Returns 0 on success. |
| @@ -41,6 +43,13 @@ bool RestoreScanReachedDepth(int nSchema, | |||
| 41 | unsigned int nLegacyNext, | 43 | unsigned int nLegacyNext, |
| 42 | int nStopDepth); | 44 | int nStopDepth); |
| 43 | 45 | ||
| 46 | // Given the pubkeys derived while scanning a compatibility branch, return the | ||
| 47 | // next index after the highest one that actually appears in wallet | ||
| 48 | // transactions. The scan depth can be much larger than this; hdnext must record | ||
| 49 | // use, not how far a restore looked ahead. | ||
| 50 | unsigned int WalletLastUsedPubKeyIndexNext( | ||
| 51 | const std::map<unsigned int, std::vector<unsigned char> >& mapPubKeysByIndex); | ||
| 52 | |||
| 44 | // Take the next address from the key pool and print it. With a recovery phrase | 53 | // Take the next address from the key pool and print it. With a recovery phrase |
| 45 | // installed the address is derived, so the phrase can bring back whatever is | 54 | // installed the address is derived, so the phrase can bring back whatever is |
| 46 | // paid to it. | 55 | // paid to it. |
| @@ -53,6 +62,40 @@ int CmdShowDerived(int nCount); | |||
| 53 | // by the installed recovery phrase or still depends on wallet.dat-only keys. | 62 | // by the installed recovery phrase or still depends on wallet.dat-only keys. |
| 54 | int CmdRecoveryAudit(); | 63 | int CmdRecoveryAudit(); |
| 55 | 64 | ||
| 65 | // Diagnostic: count wallet.dat record types without printing keys, | ||
| 66 | // addresses, transaction ids, labels, or other wallet values. | ||
| 67 | int CmdWalletStorageAudit(const std::string& strJsonOut = ""); | ||
| 68 | |||
| 69 | // Diagnostic: fail closed when wallet.dat contains an internally inconsistent | ||
| 70 | // or migration-unsafe mix of storage records. | ||
| 71 | int CmdWalletStorageCheck(); | ||
| 72 | |||
| 73 | // Copy every raw wallet.dat record into a SQLite key/value store, preserving | ||
| 74 | // serialized bytes. A migration/scripting tool; it does not change which backend | ||
| 75 | // the runtime wallet opens. | ||
| 76 | int CmdWalletSQLiteExport(const std::string& strDest); | ||
| 77 | |||
| 78 | // Export the currently-loaded wallet to a SQLite file (shared by the command | ||
| 79 | // above and the GUI wizard). Returns false with an error on any failure. | ||
| 80 | bool ExportActiveWalletToSQLite(const std::string& strDest, int& nCopiedRet, | ||
| 81 | std::string& strErrorRet); | ||
| 82 | |||
| 83 | // Convert the running Berkeley DB wallet to SQLite and record the backend | ||
| 84 | // marker so the next start opens it. wallet.dat is left untouched as fallback. | ||
| 85 | bool DoConvertWalletToSQLite(int& nCopiedRet, std::string& strErrorRet); | ||
| 86 | |||
| 87 | // Diagnostic/migration staging: compare a SQLite wallet export with the current | ||
| 88 | // wallet.dat raw records. Prints counts only, never record keys or values. | ||
| 89 | int CmdWalletSQLiteVerify(const std::string& strPath); | ||
| 90 | |||
| 91 | // Diagnostic/migration staging: rebuild wallet.dat from a SQLite export in an | ||
| 92 | // empty data directory. Refuses to overwrite an existing wallet.dat. | ||
| 93 | int CmdWalletSQLiteRestore(const std::string& strPath); | ||
| 94 | |||
| 95 | // Diagnostic/migration staging: parse a SQLite wallet export as the runtime | ||
| 96 | // wallet loader would. Prints counts only, never record keys or values. | ||
| 97 | int CmdWalletSQLiteLoadCheck(const std::string& strPath); | ||
| 98 | |||
| 56 | // Rewrite wallet.dat so private keys and the HD seed are encrypted with the | 99 | // Rewrite wallet.dat so private keys and the HD seed are encrypted with the |
| 57 | // given passphrase. Returns 0 on success and exits without starting the node. | 100 | // given passphrase. Returns 0 on success and exits without starting the node. |
| 58 | int CmdEncryptWallet(const std::string& strPassphrase); | 101 | int CmdEncryptWallet(const std::string& strPassphrase); |