Skip to content
This repository has been archived by the owner on May 6, 2020. It is now read-only.

Return a set from Proof::get_needed_txs() #12

Open
St333p opened this issue Jun 5, 2019 · 0 comments
Open

Return a set from Proof::get_needed_txs() #12

St333p opened this issue Jun 5, 2019 · 0 comments

Comments

@St333p
Copy link

St333p commented Jun 5, 2019

After writing a test for the Proof::get_needed_txs() we realized that in some cases it returns a list containing duplicated proofs.

fn get_needed_txs(&self) -> Vec<NeededTx> { 

It seems a quick fix with significant performance improvement to make it return a Set.

See src/tests/proof.rs on the "Docs and tests" pull request (#11) for an example, at the third assert there are 2 duplicated txs.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant