Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix transaction version field not properly serialized #2202

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

adambor
Copy link

@adambor adambor commented Jan 24, 2025

The transaction's version is serialized as an int, instead of uint, disallowing serializing transactions with versions >0x80000000 and allowing serializing transactions with negative version field.

Copy link
Contributor

@andrewtoth andrewtoth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK

Since bitcoin/bitcoin#29325 it is stored in bitcoind as a uint32_t, and now in Bitcoin Core v28 the JSON-RPC response returns it as an unsigned 32 bit integers. This makes transactions c659729a7fea5071361c2c1a68551ca2bf77679b27086cc415adeeb03852e369 and 35e79ee733fad376e76d16d1f10088273c2f4c2eaba1374a837378a88e530005 fail to parse.

Copy link
Contributor

@andrewtoth andrewtoth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, this line needs to be updated to use writeUInt32 as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants