aboutsummaryrefslogtreecommitdiff
path: root/test/functional/wallet_createwallet.py
AgeCommit message (Collapse)Author
2023-10-10test: Add Wallet Unlock Context ManagerBrandon Odiwuor
Add Context Manager to manage wallet locking/unlocking with passphrase
2023-10-05test: Bump walletpassphrase timeouts to avoid intermittent issuesMarcoFalke
2023-06-19test: refactor: introduce `generate_keypair` helper with WIF supportSebastian Falbesoner
In functional tests it is a quite common scenario to generate fresh elliptic curve keypairs, which is currently a bit cumbersome as it involves multiple steps, e.g.: privkey = ECKey() privkey.generate() privkey_wif = bytes_to_wif(privkey.get_bytes()) pubkey = privkey.get_pubkey().get_bytes() Simplify this by providing a new `generate_keypair` helper function that returns the private key either as `ECKey` object or as WIF-string (depending on the boolean `wif` parameter) and the public key as byte-string; these formats are what we mostly need (currently we don't use `ECPubKey` objects from generated keypairs anywhere). With this, most of the affected code blocks following the pattern above can be replaced by one-liners, e.g.: privkey, pubkey = generate_keypair(wif=True) Note that after this commit, the only direct uses of `ECKey` remain in situations where we want to set the private key explicitly, e.g. in MiniWallet (test/functional/test_framework/wallet.py) or the test for the signet miner script (test/functional/tool_signet_miner.py).
2023-06-04rpc: remove deprecated "warning" field from {create,load,restore,unload}walletSebastian Falbesoner
Co-authored-by: Jon Atack <jon@atack.com>
2023-04-10test: fix importmulti/importdescriptors assertionJon Atack
as these RPCs have a "warnings" field, not a "warning" one.
2023-04-10test: createwallet "warning" field deprecation testJon Atack
2023-04-10rpc: deprecate "warning" field in {create,load,unload,restore}walletJon Atack
This string field has been replaced in these four RPCs by a "warnings" field returning a JSON array of strings.
2023-04-10test: add test coverage for "warnings" field in createwalletJon Atack
and clarify the "warning" field behavior.
2022-12-24scripted-diff: Bump copyright headersHennadii Stepanov
-BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./ -END VERIFY SCRIPT- Commits of previous years: - 2021: f47dda2c58b5d8d623e0e7ff4e74bc352dfa83d7 - 2020: fa0074e2d82928016a43ca408717154a1c70a4db - 2019: aaaaad6ac95b402fe18d019d67897ced6b316ee0
2022-11-10test: Remove wallet option from non-wallet testsMacroFake
Review note: The changes are complete, because self.options.descriptors is set to None in parse_args (test_framework.py). A value of None implies -disablewallet, see the previous commit. So if a call to add_wallet_options is missing, it will lead to a test failure when the wallet is compiled in.
2022-04-27tests: Do not always create a descriptor wallet in wallet_createwalletAndrew Chow
The createwallet teswt for some invalid parameters incorrectly always creates a descriptor wallet. This is unnecessary and also breaks the test when bdb is not compiled in.
2022-04-16test: Add a test that creates a wallet with invalid parametersw0xlt
Invalid parameters must not prevent a new wallet with the same name from being created with the correct parameters
2022-03-10wallet: Add a deprecation warning for newly created legacy walletsAndrew Chow
2021-11-16Create a tr() descriptor bech32m DescriptorScriptPubKeyMan by defaultAndrew Chow
2021-11-10scripted-diff: Bump copyright headersMarcoFalke
The previous diff touched most files in ./test/, so bump the headers to avoid having to touch them again for a bump later. -BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./test/ -END VERIFY SCRIPT-
2021-09-02scripted-diff: Use generate* from TestFrameworkMarcoFalke
-BEGIN VERIFY SCRIPT- sed --regexp-extended -i \ 's/((self\.)?(nodes\[[^]]+\]|[a-z_]*(wallet|node)[0-9a-z_]*))\.(generate(|toaddress|block|todescriptor)(\(|, ))/self.\5\1, /g' \ $(git grep -l generate ./test | grep -v 'test_framework/' | grep -v 'feature_rbf') -END VERIFY SCRIPT-
2021-02-01scripted-diff: Remove setup_clean_chain if default is not changedFabian Jahr
-BEGIN VERIFY SCRIPT- git grep -l "self.setup_clean_chain = False" test/functional/*.py | xargs sed -i "/self.setup_clean_chain = False/d"; -END VERIFY SCRIPT-
2020-11-01Use importdescriptors when in descriptor wallet mode in wallet_createwallet.pyAndrew Chow
sethdseed and importmulti are not available for descriptor wallets, so when doing descriptor wallet tests, use importdescriptors instead. Also changes some output to match what descriptor wallets will return.
2020-04-16scripted-diff: Bump copyright headersMarcoFalke
-BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./ -END VERIFY SCRIPT-
2020-03-11test: Bump walletpassphrase timeouts in wallet_createwallet to avoid ↵MarcoFalke
valgrind timeouts
2020-03-10ci: Enable all functional tests in valgrindMarcoFalke
2019-12-06tests: Use a default of supports_cli=True (instead of supports_cli=False)practicalswift
2019-07-29Allow createwallet to take empty passwords to make unencrypted walletsAndrew Chow
Allow createwallet to take the empty string as a password and interpret that as leaving the wallet unencrypted. Also warn when that happens.
2019-07-19Return error for ignored passphrase through disable private keys optionFabian Jahr
2019-06-04wallet: do not encrypt wallets with disabled private keyswhythat
2019-05-13Add option to create an encrypted walletAndrew Chow
2019-03-02scripted-diff: Update copyright in ./testMarcoFalke
-BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./test/ -END VERIFY SCRIPT-
2019-03-02scripted-diff: test: Remove brackets after assertMarcoFalke
-BEGIN VERIFY SCRIPT- sed -i --regexp-extended -e 's/assert ?\((.+)\)(( )*)?(#.*)?$/assert \1\3\3\4/g' $(git grep -l --extended-regexp 'assert ?\(' test) -END VERIFY SCRIPT-
2019-02-14Fetch keys from keypool when private keys are disabledAndrew Chow
When private keys are disabled, still fetch keys from the keypool if the keypool has keys. Those keys come from importing them and adding them to the keypool.
2019-02-10[wallet] Support creating a blank walletAndrew Chow
A blank wallet is a wallet that has no keys, script or watch only things. A new wallet flag indicating that it is blank will be set when the wallet is blank. Once it is no longer blank (a seed has been generated, keys or scripts imported, etc), the flag will be unset.