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

Return Iterator instead of Vector for SRD #33

Closed

Conversation

yancyribbens
Copy link
Collaborator

Return Iterator instead of Vector for SRD.

The caller may prefer to work with an Iterator instead of a vec. If the caller prefers a vec, they can use collect(). This is the first commit to close #31

@@ -59,15 +59,11 @@ pub struct WeightedUtxo {
#[cfg_attr(docsrs, doc(cfg(feature = "rand")))]
pub fn select_coins<T: Utxo>(
target: Amount,
cost_of_change: u64,
_cost_of_change: u64,
Copy link

Choose a reason for hiding this comment

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

What? Why is this not used?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's only used by bnb, not srd and frankly the current version of bnb that's in master is broken so I just commented it out. I'm still waiting to get some review on #30, especially those that created issues.

Copy link

Choose a reason for hiding this comment

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

Weird that it doesn't take into account the cost of change (why would anyone want such algo then?) anyway, just remove the argument?

@yancyribbens
Copy link
Collaborator Author

yancyribbens commented Feb 16, 2024 via email

@yancyribbens
Copy link
Collaborator Author

yancyribbens commented Feb 16, 2024 via email

@yancyribbens
Copy link
Collaborator Author

yancyribbens commented Feb 16, 2024 via email

@yancyribbens
Copy link
Collaborator Author

yancyribbens commented Feb 16, 2024 via email

@yancyribbens
Copy link
Collaborator Author

moved changes to #30

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.

Change all return types to iter
2 participants