Review Club : Store transaction nVersion as uint32_t #72
Prabhat1308
started this conversation in
PR Reviews
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Session Details
Date : 25-07-2024
Time: IST 20:00 (UTC 14:30)
Link : bitcoin/bitcoin#29325
Difficulty : Easy
Notes
Previous implementation of
nVersion
usedint
(signed) and used everywhere after casting it touint
(unsigned) . This pull request introduces to make nVersionuint
itself to avoid consensus failure in the future .Questions
int32_t
instead ofuint32_t
. What are the possible issues that may have arised during type-casting.src/bitcoin-tx.cpp
the new version was changed fromint64_t
touint32_t
. Why ? (Hint: One of the possible issues from previous question).-1
is used as an alias forstd::numeric_limits<unsigned ...>::max()
. Why is that and how does this work ?Learning
Bitcoin consensus
Transaction serialisation
Beta Was this translation helpful? Give feedback.
All reactions