mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-04 17:52:25 +01:00
5e190cd11fReplace CScript _hex_v_u8 appends with _hex (Lőrinc)cac846c2fbAllow CScript's operator<< to accept spans, not just vectors (Lőrinc)c78d8ff4cbprevector: avoid GCC bogus warnings in insert method (Lőrinc) Pull request description: Split out of https://github.com/bitcoin/bitcoin/pull/30377#discussion_r1722326803. Replace `_hex_v_u8` for `CScript` appends to `_hex`, to skip vector conversion before serializing to the `prevector` in `CScript`. To enable both `unsigned char` and `std::byte` values, I've extracted the existing serialization to append the size & data in separate private methods to clarify that it does more than just a simple data insertion. There were also discussion on eliminating the operators here completely to obviate when we're serializing fixed-size collections as raw bytes, and when we're prefixing them with their size - should also be done in a separate PR. ACKs for top commit: achow101: ACK5e190cd11fryanofsky: Code review ACK5e190cd11f. Looks good! hodlinator: re-ACK5e190cd11fTree-SHA512: 27a646629e017b2a05416d5eb964dda8b25b900d466221eff7bfa1339ded443e1c5c4cf8ff20cb3bba915a2603787a9fa6f6ec12bc0b9415d9eb07b57289192b