Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge bitcoin-core/gui#808: Change example address from legacy (P2PKH…
…) to bech32m (P2TR) c6d1b8d gui: change example address from legacy (P2PKH) to bech32m (P2TR) (Sebastian Falbesoner) Pull request description: Legacy addresses are less and less common these days and not recommended to use, so it seems senseful to also reflect that in the example addresses and update to the most recent address / output type (bech32m / P2TR). Also, as I couldn't see any value in computing these at runtime, they are pre-generated. This was done with the following Python script, executed in `./test/functional` (it's also included in the commit body, though without the she-bang): ```python #!/usr/bin/env python3 from test_framework.segwit_addr import CHARSET, decode_segwit_address, encode_segwit_address from test_framework.messages import sha256 output_key = sha256(b'bitcoin dummy taproot output key') for network, hrp in [('mainnet', 'bc'), ('signet', 'tb'), ('testnet', 'tb'), ('regtest', 'bcrt')]: dummy_address = encode_segwit_address(hrp, 1, output_key) while decode_segwit_address(hrp, dummy_address) != (None, None): last_char = CHARSET[(CHARSET.index(dummy_address[-1]) + 1) % 32] dummy_address = dummy_address[:-1] + last_char print(f'{network:7} example address: {dummy_address}') ``` Note that the last bech32 character is modified in order to make the checksum fail. master (mainnet): ![image](https://github.com/bitcoin-core/gui/assets/91535/8c94cc1e-5649-47ed-8b2d-33b18654f6a2) PR (mainnet): ![image](https://github.com/bitcoin-core/gui/assets/91535/1ce208a6-1218-4850-93e0-5323c73e9049) ACKs for top commit: maflcko: lgtm ACK c6d1b8d pablomartin4btc: tACK c6d1b8d Tree-SHA512: a53c267a3e0d29b9c41bf043b123e7152fbf297e2322d74ce047ba2582b54768187162d462cc334e91a84874731c2e0793726ad44d9970c10ecfe70a1d4f3f1c
- Loading branch information