Skip to content

fix: an API for partial read FixVec is incorrect#49

Merged
chaoticlonghair merged 3 commits into
nervosnetwork:masterfrom
chaoticlonghair:pr/fix-a-bug
Jul 29, 2021
Merged

fix: an API for partial read FixVec is incorrect#49
chaoticlonghair merged 3 commits into
nervosnetwork:masterfrom
chaoticlonghair:pr/fix-a-bug

Conversation

@chaoticlonghair

Copy link
Copy Markdown
Contributor

Reader:

let total_size = molecule::NUMBER_SIZE + Self::ITEM_SIZE * item_count;
if slice_len != total_size {
return ve!(Self, TotalSizeNotMatch, total_size, slice_len);
}

Builder:
fn expected_length(&self) -> usize {
molecule::NUMBER_SIZE + Self::ITEM_SIZE * self.0.len()
}

zhangsoledad
zhangsoledad previously approved these changes Jul 29, 2021
@chaoticlonghair chaoticlonghair merged commit 7e24fa8 into nervosnetwork:master Jul 29, 2021
@chaoticlonghair chaoticlonghair deleted the pr/fix-a-bug branch July 29, 2021 16:01
bors Bot added a commit to nervosnetwork/ckb that referenced this pull request Jul 30, 2021
2884: chore(deps): bump molecule from 0.7.1 to 0.7.2 r=doitian,driftluo a=yangby-cryptape

Bumps [molecule](https://github.com/nervosnetwork/molecule/) from 0.7.1 to 0.7.2.

<details><summary>Important Commits</summary><br/>

- [fix: an API for partial read FixVec is incorrect](nervosnetwork/molecule@86354da)

  Not affect CKB, but we expose the incorrect methods.

  See nervosnetwork/molecule#49 for more details.

</details>

Co-authored-by: Boyu Yang <yangby@cryptape.com>
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