aboutsummaryrefslogtreecommitdiff
path: root/test/functional/rpc_invalid_address_message.py
AgeCommit message (Collapse)Author
2024-07-22Merge bitcoin/bitcoin#30463: qa: Functional test improvementsglozow
a8e3af1a82dd584a1cc3ffbe587e66889f72e3c7 qa: Do not assume running `feature_asmap.py` from source directory (Hennadii Stepanov) 9bf7ca6cad888d460f57d249264dc0062025bb3f qa: Consider `cache` and `config.ini` relative to invocation directory (Hennadii Stepanov) a0473442d1c22043f5a288bd9255c006fd85d947 scripted-diff: Add `__file__` argument to `BitcoinTestFramework.init()` (Hennadii Stepanov) Pull request description: This PR includes changes split from https://github.com/bitcoin/bitcoin/pull/30454. They improve the functional test framework, allowing users to [run individual functional tests](https://github.com/hebasto/bitcoin/issues/146) from the build directory in the new CMake-based build system. This functionality is not available for out-of-source builds using the current Autotools-based build system, which always requires write permissions for the source directory. Nevertheless, this PR can be tested as suggested in https://github.com/bitcoin/bitcoin/pull/30463#issuecomment-2232618421: 1. Make an out-of-source build: ``` $ ./autogen.sh $ mkdir ../build && cd ../build $ ../bitcoin/configure $ make ``` 2. Create a symlink in the build directory to a functional test: ``` $ ln --symbolic ../../../bitcoin/test/functional/wallet_disable.py ./test/functional/ ``` 3. Run this symlink: ``` $ ./test/functional/wallet_disable.py ``` The last command fails on the master branch: ``` Traceback (most recent call last): File "/home/hebasto/git/build/./test/functional/wallet_disable.py", line 31, in <module> DisableWalletTest().main() ^^^^^^^^^^^^^^^^^^^ File "/home/hebasto/git/bitcoin/test/functional/test_framework/test_framework.py", line 106, in __init__ self.parse_args() File "/home/hebasto/git/bitcoin/test/functional/test_framework/test_framework.py", line 210, in parse_args config.read_file(open(self.options.configfile)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: '/home/hebasto/git/bitcoin/test/config.ini' ``` and succeeds with this PR. ACKs for top commit: maflcko: tested ACK a8e3af1a82dd584a1cc3ffbe587e66889f72e3c 🎨 glozow: ACK a8e3af1a82dd584a1cc3ffbe587e66889f72e3c7, tested with the steps in op stickies-v: ACK a8e3af1a82dd584a1cc3ffbe587e66889f72e3c7 Tree-SHA512: 899e4efc09edec13ea3f5b47825d03173fb21d3569c360deda7fa6a56b99b4d24e09ad4f0883bad1ee926b1c706e47ba07c6a6160c63c07c82b3cf4ae5816e91
2024-07-17doc: getaddressinfo[isscript] is optionalMarcoFalke
2024-07-16scripted-diff: Add `__file__` argument to `BitcoinTestFramework.init()`Hennadii Stepanov
-BEGIN VERIFY SCRIPT- sed -i -e 's/\s*().main\s*()/(__file__).main()/' $(git ls-files test/functional/*.py) sed -i -e 's/def __init__(self)/def __init__(self, test_file)/' test/functional/test_framework/test_framework.py -END VERIFY SCRIPT-
2023-05-25use 'byte'/'bytes' for bech32(m) validation errorReese Russell
changed from std::string -> std::string_view applied snake case to byteStr -> byte_str
2023-05-23rpc: Fix invalid bech32 handlingMarcoFalke
2023-01-17Improve address decoding errorsAurèle Oulès
2023-01-17test: Add test for missing and omitted required argMarcoFalke
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.
2021-11-23Report encoding type in bech32 error messageSamuel Dobson
2021-11-23Address review comments for Bech32 error validationSamuel Dobson
2021-11-22Merge bitcoin/bitcoin#16807: Let validateaddress locate error in Bech32 addressW. J. van der Laan
88cc4810926e4f5af6757ee1b0eed61abda3d746 Modify copyright header on Bech32 code (Samuel Dobson) 5599813b80e53a1539c66625b4320ab1b4fb4848 Add lots of comments to Bech32 (Samuel Dobson) 2eb5792ec7bbeaf7138420b6c85c5cd0a0404946 Add release notes for validateaddress Bech32 error detection (MeshCollider) 42d6a029e57a32f2d1d829ff7718b6d40d58b9d1 Refactor and add more tests for validateaddress (Samuel Dobson) c4979f77c1264f0099d1dfa278b1d9c18340b5f9 Add boost tests for bech32 error detection (MeshCollider) 02a7bdee429ae307a5e57832727fed789e2e04fb Add error_locations to validateaddress RPC (Samuel Dobson) b62b67e06cc406fdad68da4c091168fb5f11c1d4 Add Bech32 error location function (Samuel Dobson) 0b06e720c0182dee8b560d2e8d3891b036f63ea7 More detailed error checking for base58 addresses (Samuel Dobson) Pull request description: Addresses (partially) #16779 - no GUI change in this PR Adds a LocateError function the bech32 library, which is then called by `validateaddress` RPC, (and then eventually from a GUI tool too, future work). I think modifying validateaddress is nicer than adding a separate RPC for this. Includes tests. Based on https://github.com/sipa/bech32/blob/master/ecc/javascript/bech32_ecc.js Credit to sipa for that code ACKs for top commit: laanwj: Code review and manually tested ACK 88cc4810926e4f5af6757ee1b0eed61abda3d746 ryanofsky: Code review ACK 88cc4810926e4f5af6757ee1b0eed61abda3d746 with caveat that I only checked the new `LocateErrors` code to try to verify it didn't have unsafe or unexpected operations or loop forever or crash. Did not try to verify behavior corresponds to the spec. In the worst case bugs here should just affect error messages not actual decoding of addresses so this seemed ok. w0xlt: tACK 88cc481 Tree-SHA512: 9c7fe9745bc7527f80a30bd4c1e3034e16b96a02cc7f6c268f91bfad08a6965a8064fe44230aa3f87e4fa3c938f662ff4446bc682c83cb48c1a3f95cf4186688
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-10-20Make explicit the node param in init_wallet()lsilva01
2021-10-12Refactor and add more tests for validateaddressSamuel Dobson
2021-10-12More detailed error checking for base58 addressesSamuel Dobson
2021-09-21Add BECH32_INVALID_VERSION testlsilva01
2021-09-21skip test_getaddressinfo() if wallet is disabledlsilva01
2021-03-16Use Bech32m encoding for v1+ segwit addressesPieter Wuille
This also includes updates to the Python test framework implementation, test vectors, and release notes.
2021-01-24Better error messages for invalid addressesBezdrighin
This commit addresses #20809. We add an additional 'error' property in the result of 'validateaddress' in case the address is not valid that gives a short description of why the address in invalid. We also change the error message returned by 'getaddressinfo' in case the address is invalid.