Commit 83c7269
committed
Merge bitcoin/bitcoin#27800: streams: Drop confusing DataStream::Serialize method and << operator
5cd0717 streams: Drop confusing DataStream::Serialize method and << operator (Ryan Ofsky)
Pull request description:
DataStream Serialize method has surprising behavior because it just serializes raw bytes without a length prefix. When you serialize a string or vector, a length prefix is serialized before the raw object contents so the object can be unambiguously deserialized later. But DataStreams don't support deserializing at all and just dump the raw bytes.
Having this inconsistency is not necessary and could be confusing (see bitcoin/bitcoin#27790 (comment)) so this PR just drops the DataStream::Serialize method.
ACKs for top commit:
furszy:
lgtm ACK 5cd0717
MarcoFalke:
lgtm ACK 5cd0717 🌙
Tree-SHA512: 49dd117de266f091a5336b13a91c5d8658abe1b3a0a9c51c8b5f6a2e0e814781b73afc39256353e79dade603a8a2761e8536716d1a48499720c266f4500477e24 files changed
+4
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3418 | 3418 | | |
3419 | 3419 | | |
3420 | 3420 | | |
3421 | | - | |
3422 | | - | |
| 3421 | + | |
| 3422 | + | |
3423 | 3423 | | |
3424 | 3424 | | |
3425 | 3425 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
293 | 293 | | |
294 | 294 | | |
295 | 295 | | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | 296 | | |
305 | 297 | | |
306 | 298 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
255 | 255 | | |
256 | 256 | | |
257 | 257 | | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
| 258 | + | |
263 | 259 | | |
264 | 260 | | |
265 | 261 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3875 | 3875 | | |
3876 | 3876 | | |
3877 | 3877 | | |
3878 | | - | |
3879 | | - | |
3880 | | - | |
| 3878 | + | |
3881 | 3879 | | |
3882 | 3880 | | |
3883 | 3881 | | |
| |||
0 commit comments