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

Always store script pubkey in output table #4254

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

raphjaph
Copy link
Collaborator

@raphjaph raphjaph commented Mar 4, 2025

No description provided.

Copy link
Collaborator

@casey casey left a comment

Choose a reason for hiding this comment

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

This looks reasonable to me, but I think it needs a test, and we need to profile index time and index size. I think this is probably fine but we need to understand the impact of doing it.

/// If `--index-inscriptions`, the list of inscriptions stored as
/// `(sequence_number, offset)`, with the sequence number stored as a u32 and
/// the offset as a varint.
///
/// The script pubkey stored as a varint followed by that many bytes of data.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why did this comment move? It looks like the order of how things are stored didn't change.

offset += script_pubkey_len;
}
let script_pubkey_len = usize::try_from(script_pubkey_len).unwrap();
let script_pubkey = Some(&self.bytes[offset..offset + script_pubkey_len]);
Copy link
Collaborator

Choose a reason for hiding this comment

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

The forward variable declaration of script_pubkey was no longer necessary.

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.

2 participants