Skip to content

fix: make 1-based indexing in tbls implementation#279

Open
varex83 wants to merge 2 commits intomainfrom
bohdan/fix-indexing-tbls
Open

fix: make 1-based indexing in tbls implementation#279
varex83 wants to merge 2 commits intomainfrom
bohdan/fix-indexing-tbls

Conversation

@varex83
Copy link
Collaborator

@varex83 varex83 commented Mar 12, 2026

No description provided.

.map_err(|_| Error::InvalidSignatureSize(sig_idx.saturating_add(1)))?;
.map_err(|_| Error::InvalidSignatureSize(sig_idx.saturating_add(1)))?
.checked_add(1)
.ok_or(Error::InvalidSignatureSize(sig_idx.saturating_add(2)))?;
Copy link
Collaborator

Choose a reason for hiding this comment

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

This seems off by 1?

// at array position share_id-1, e.g., share 1 at position 0)
let share_idx = u8::try_from(sig_idx)
.map_err(|_| Error::InvalidSignatureSize(sig_idx.saturating_add(1)))?;
.map_err(|_| Error::InvalidSignatureSize(sig_idx.saturating_add(1)))?
Copy link
Collaborator

Choose a reason for hiding this comment

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

sig_idx.checked_add(1).and_then(u8:try_from).ok_or()

[[package]]
name = "alloy"
version = "1.7.3"
version = "1.6.3"
Copy link
Collaborator

Choose a reason for hiding this comment

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

why there is a change on Cargo.lock :-?

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