aboutsummaryrefslogtreecommitdiff
path: root/test/functional/wallet_blank.py
AgeCommit message (Collapse)Author
2023-10-10 test: Use pathlib over os.path #28362ns-xvrn
revert netutil chgs py3.8 compliant fixes based on PR review
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-13wallet: Ensure that the blank wallet flag is unset after importsAndrew Chow
2023-06-08rpc, wallet: Include information about blank flagAndrew Chow
This allows us to test that the blank flag is being set appropriately.