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

Write tests for collect_chain_hashes #1399

Closed
teor2345 opened this issue Nov 26, 2020 · 1 comment
Closed

Write tests for collect_chain_hashes #1399

teor2345 opened this issue Nov 26, 2020 · 1 comment
Labels
A-rust Area: Updates to Rust code C-enhancement Category: This is an improvement S-needs-investigation Status: Needs further investigation

Comments

@teor2345
Copy link
Contributor

In PR #1347, we implemented the FindBlocks and FindHeaders inbound peer requests.

Most of the code is quite simple. The only complex function is collect_chain_hashes.

We should test block_locator and collect_chain_hashes against each other using proptests.

Each proptest should make sure that collect_chain_hashes obeys the protocol rules.
(See the assertions in collect_chain_hashes for some of these rules.)

We might also want to add unit tests for protocol edge-cases.

I don't know if we'll have time to do these tests in the first alpha release.

@teor2345 teor2345 added A-rust Area: Updates to Rust code C-enhancement Category: This is an improvement S-needs-triage Status: A bug report needs triage labels Nov 26, 2020
@teor2345 teor2345 added S-needs-design Status: Needs a design decision S-needs-investigation Status: Needs further investigation and removed S-needs-design Status: Needs a design decision labels Dec 17, 2020
@mpguerra mpguerra removed this from the v1.0.0-alpha.1 milestone Jan 11, 2021
@mpguerra mpguerra removed the S-needs-triage Status: A bug report needs triage label Feb 2, 2021
@teor2345
Copy link
Contributor Author

We have good test coverage for this code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rust Area: Updates to Rust code C-enhancement Category: This is an improvement S-needs-investigation Status: Needs further investigation
Projects
None yet
Development

No branches or pull requests

2 participants