Skip to content

lib/tx.py: fix wtxid and vsize calculation#328

Merged
SomberNight merged 3 commits into
spesmilo:masterfrom
SomberNight:202511_fix_libtx
Nov 18, 2025
Merged

lib/tx.py: fix wtxid and vsize calculation#328
SomberNight merged 3 commits into
spesmilo:masterfrom
SomberNight:202511_fix_libtx

Conversation

@SomberNight

Copy link
Copy Markdown
Member
  • the wtxid calculation has been incorrect since it was added in 9c123a7
    • this was not exposed externally anywhere (nothing uses wtxids, yet)
  • the vsize calculation has been incorrect since it was added in e5b4f5f
    • it was off by ~7.5 vbytes for segwit txs, and ~6 vbytes for non-segwit txs
    • this was externally observable via the mempool.get_fee_histogram RPC
  • added test cases

@SomberNight
SomberNight merged commit c5fb27e into spesmilo:master Nov 18, 2025
3 checks passed
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.

1 participant