bitcoin/src/script
Ava Chow 33adc7521c
Merge bitcoin/bitcoin#30765: refactor: Allow CScript's operator<< to accept spans, not just vectors
5e190cd11f Replace CScript _hex_v_u8 appends with _hex (Lőrinc)
cac846c2fb Allow CScript's operator<< to accept spans, not just vectors (Lőrinc)
c78d8ff4cb prevector: 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:
    ACK 5e190cd11f
  ryanofsky:
    Code review ACK 5e190cd11f. Looks good!
  hodlinator:
    re-ACK 5e190cd11f

Tree-SHA512: 27a646629e017b2a05416d5eb964dda8b25b900d466221eff7bfa1339ded443e1c5c4cf8ff20cb3bba915a2603787a9fa6f6ec12bc0b9415d9eb07b57289192b
2024-09-20 15:16:53 -04:00
..
descriptor.cpp Merge bitcoin/bitcoin#22838: descriptors: Be able to specify change and receiving in a single descriptor string 2024-08-28 15:56:15 +01:00
descriptor.h descriptors: Change Parse to return vector of descriptors 2024-08-08 12:47:22 -04:00
interpreter.cpp fix use int32_t instead of int type for risczero compile with (-march=rv32i, -mabi=ilp32) 2024-09-03 09:52:02 +08:00
interpreter.h tidy: modernize-use-equals-default 2024-07-08 11:12:01 +02:00
keyorigin.h
miniscript.cpp miniscript: make operator_mst consteval 2024-05-03 11:38:14 -04:00
miniscript.h miniscript: Use ToIntegral instead of ParseInt64 2024-08-05 08:23:24 -03:00
parsing.cpp util: move spanparsing.h to script/parsing.h 2024-05-16 10:16:08 -05:00
parsing.h util: move spanparsing.h to script/parsing.h 2024-05-16 10:16:08 -05:00
script.cpp policy: Add OP_1 <0x4e73> as a standard output type 2024-07-30 14:06:58 -04:00
script.h Allow CScript's operator<< to accept spans, not just vectors 2024-09-11 17:41:27 +02:00
script_error.cpp
script_error.h
sigcache.cpp kernel: De-globalize signature cache 2024-07-05 09:03:04 +02:00
sigcache.h kernel: De-globalize signature cache 2024-07-05 09:03:04 +02:00
sign.cpp refactor: move SignSignature helpers to test utils 2024-09-04 21:06:09 +02:00
sign.h refactor: move SignSignature helpers to test utils 2024-09-04 21:06:09 +02:00
signingprovider.cpp ci: Bump TIDY_LLVM_V 2024-03-15 13:34:05 +00:00
signingprovider.h tidy: modernize-use-equals-default 2024-07-08 11:12:01 +02:00
solver.cpp policy: Add OP_1 <0x4e73> as a standard output type 2024-07-30 14:06:58 -04:00
solver.h policy: Add OP_1 <0x4e73> as a standard output type 2024-07-30 14:06:58 -04:00