mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-10 12:43:30 +01:00
9b7023d31aFuzz HRP of bech32 as well (Lőrinc)c1a5d5c100Split out bech32 separator char to header (Lőrinc) Pull request description: Instead of the static "bc" human-readable part, it's now randomly generated based on https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki and the extra restrictions in the code: > The human-readable part, which is intended to convey the type of data, or anything else that is relevant to the reader. This part MUST contain 1 to 83 US-ASCII characters, with each character having a value in the range [33-126]. HRP validity may be further restricted by specific applications. Since `bech32::Encode` rejects uppercase letters, we're actually generating values in the `[33-126] - ['A'-'Z']` range. Split out of https://github.com/bitcoin/bitcoin/pull/30596/files#r1706957219 ACKs for top commit: sipa: ACK9b7023d31aachow101: ACK9b7023d31amarcofleon: Code review ACK9b7023d31a. The separation into two targets and the new `GenerateRandomHRP` seem fine to me. brunoerg: code review ACK9b7023d31aTree-SHA512: 22a261b8e7b5516e98f4e7990811954454595438a49a10191ed4ca42b5c71c5054fcc73f2d94e23b498ea833c7f1d5adb225f537ef1a24d15b428259450cdf98