Skip to content

Use deserialize_hex to avoid intermediate Vec allocation#205

Open
EddieHouston wants to merge 2 commits intoBlockstream:new-indexfrom
EddieHouston:refactor/deserialize-hex
Open

Use deserialize_hex to avoid intermediate Vec allocation#205
EddieHouston wants to merge 2 commits intoBlockstream:new-indexfrom
EddieHouston:refactor/deserialize-hex

Conversation

@EddieHouston
Copy link
Copy Markdown
Collaborator

Summary

  bitcoin 0.32 provides deserialize_hex which parses hex directly into
  the target type without allocating an intermediate Vec<u8>. The elements
  crate (0.26) doesn't expose this yet, so liquid builds keep the
  two-step FromHex + deserialize path behind a cfg gate.
RCasatta
RCasatta previously approved these changes Apr 8, 2026
Copy link
Copy Markdown
Collaborator

@RCasatta RCasatta left a comment

Choose a reason for hiding this comment

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

concept ACK 4f7bf8b

@philippem philippem requested review from Randy808 and shesek April 8, 2026 14:20
…y which type (Block, Transaction, BlockHeader) failed.
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.

Use rust bitcoin deserialize_hex when upgrading version

2 participants