mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
Merge bitcoin/bitcoin#26606: wallet: Implement independent BDB parser
d51fbab4b3wallet, test: Be able to always swap BDB endianness (Ava Chow)0b753156cetest: Test bdb_ro dump of wallet without reset LSNs (Ava Chow)c1984f1282test: Test dumping dbs with overflow pages (Ava Chow)fd7b16e391test: Test dumps of other endian BDB files (Ava Chow)6ace3e953fbdb: Be able to make byteswapped databases (Ava Chow)d9878903fbError if LSNs are not reset (Ava Chow)4d7a3ae78eBerkeley RO Database fuzz test (TheCharlatan)3568dce9e9tests: Add BerkeleyRO to db prefix tests (Ava Chow)70cfbfdadfwallettool: Optionally use BERKELEY_RO as format when dumping BDB wallets (Ava Chow)dd57713f6eAdd MakeBerkeleyRODatabase (Ava Chow)6e50bee67dImplement handling of other endianness in BerkeleyRODatabase (Ava Chow)cdd61c9cc1wallet: implement independent BDB deserializer in BerkeleyRODatabase (Ava Chow)ecba230979wallet: implement BerkeleyRODatabase::Backup (Ava Chow)0c8e728476wallet: implement BerkeleyROBatch (Ava Chow)756ff9b478wallet: add dummy BerkeleyRODatabase and BerkeleyROBatch classes (Ava Chow)ca18aea5c4Add AutoFile::seek and tell (Ava Chow) Pull request description: Split from #26596 This PR adds `BerkeleyRODatabase` which is an independent implementation of a BDB file parser. It provides read only access to a BDB file, and can therefore be used as a read only database backend for wallets. This will be used for dumping legacy wallet records and migrating legacy wallets without the need for BDB itself. Wallettool's `dump` command is changed to use `BerkeleyRODatabase` instead of `BerkeleyDatabase` (and `CWallet` itself) to demonstrate that this parser works and to test it against the existing wallettool functional tests. ACKs for top commit: josibake: reACKd51fbab4b3TheCharlatan: Re-ACKd51fbab4b3furszy: reACKd51fbab4b3laanwj: re-ACKd51fbab4b3theStack: ACKd51fbab4b3Tree-SHA512: 1e7b97edf223b2974eed2e9eac1179fc82bb6359e0a66b7d2a0c8b9fa515eae9ea036f1edf7c76cdab2e75ad994962b134b41056ccfbc33b8d54f0859e86657b
This commit is contained in:
@@ -40,6 +40,7 @@ static void SetupWalletToolArgs(ArgsManager& argsman)
|
||||
argsman.AddArg("-legacy", "Create legacy wallet. Only for 'create'", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
|
||||
argsman.AddArg("-format=<format>", "The format of the wallet file to create. Either \"bdb\" or \"sqlite\". Only used with 'createfromdump'", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
|
||||
argsman.AddArg("-printtoconsole", "Send trace/debug info to console (default: 1 when no -debug is true, 0 otherwise).", ArgsManager::ALLOW_ANY, OptionsCategory::DEBUG_TEST);
|
||||
argsman.AddArg("-withinternalbdb", "Use the internal Berkeley DB parser when dumping a Berkeley DB wallet file (default: false)", ArgsManager::ALLOW_ANY, OptionsCategory::DEBUG_TEST);
|
||||
|
||||
argsman.AddCommand("info", "Get wallet info");
|
||||
argsman.AddCommand("create", "Create new wallet file");
|
||||
|
||||
Reference in New Issue
Block a user