mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
88cc481092Modify copyright header on Bech32 code (Samuel Dobson)5599813b80Add lots of comments to Bech32 (Samuel Dobson)2eb5792ec7Add release notes for validateaddress Bech32 error detection (MeshCollider)42d6a029e5Refactor and add more tests for validateaddress (Samuel Dobson)c4979f77c1Add boost tests for bech32 error detection (MeshCollider)02a7bdee42Add error_locations to validateaddress RPC (Samuel Dobson)b62b67e06cAdd Bech32 error location function (Samuel Dobson)0b06e720c0More 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 ACK88cc481092ryanofsky: Code review ACK88cc481092with 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: tACK88cc481Tree-SHA512: 9c7fe9745bc7527f80a30bd4c1e3034e16b96a02cc7f6c268f91bfad08a6965a8064fe44230aa3f87e4fa3c938f662ff4446bc682c83cb48c1a3f95cf4186688
5.7 KiB
Executable File
5.7 KiB
Executable File