Split out from https://github.com/bitcoin/bitcoin/pull/24697
refactor: Remove no-op TIME_INIT on deser #25245
pull MarcoFalke wants to merge 1 commits into bitcoin:master from MarcoFalke:2205-no-time-deser-🌗 changing 2 files +2 −7-
MarcoFalke commented at 10:37 AM on May 30, 2022: member
- DrahtBot added the label P2P on May 30, 2022
- DrahtBot added the label Refactoring on May 30, 2022
- MarcoFalke force-pushed on May 30, 2022
-
fa243e9313
Remove no-op TIME_INIT on deser
Assigning TIME_INIT to nTime was needed to fully re-initialize a dirty object where the deserialization might skip nTime. See https://github.com/bitcoin/bitcoin/pull/19020/files#r427620111 Now that the without-nTime logic is removed in commit dbcb5742c48fd26f77e500291d7083e12eec741b and commit e08770bed187bfa66f525d42e484579bcea78bba, the logic here can be removed as well. Also, remove confusing and redundant preprocessor code. Also, remove no longer needed version.h include, which was needed for INIT_PROTO_VERSION.
- MarcoFalke force-pushed on May 30, 2022
-
in src/bitcoin-util.cpp:18 in fa243e9313
14 | @@ -15,6 +15,7 @@ 15 | #include <streams.h> 16 | #include <util/system.h> 17 | #include <util/translation.h> 18 | +#include <version.h>
laanwj commented at 1:37 PM on May 30, 2022:Looks like an unrelated change snuck in here?
MarcoFalke commented at 1:55 PM on May 30, 2022:No, the changes here wouldn't compile without this change.
Commit dbcb5742c48fd26f77e500291d7083e12eec741b removed
INIT_PROTO_VERSIONfrom protocol.h, but didn't remove the version.h include from protocol, so I am doing that here.
laanwj commented at 2:17 PM on May 30, 2022:Thanks, makes sense.
fanquake approvedfanquake commented at 1:22 PM on May 31, 2022: memberACK fa243e93138d899f41be02af3fa2b029dd8d525e
laanwj commented at 4:52 PM on June 7, 2022: memberACK fa243e93138d899f41be02af3fa2b029dd8d525e
laanwj merged this on Jun 7, 2022laanwj closed this on Jun 7, 2022MarcoFalke deleted the branch on Jun 7, 2022sidhujag referenced this in commit 1a5a74507f on Jun 8, 2022DrahtBot locked this on Jun 7, 2023ContributorsLabels
github-metadata-mirror
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-17 06:13 UTC
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-17 06:13 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me
More mirrored repositories can be found on mirror.b10c.me