Commit 5cd0717
committed
streams: Drop confusing DataStream::Serialize method and << operator
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.1 parent 3a83d44 commit 5cd0717
4 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