Skip to content

Conversation

@Cyrix126
Copy link

That's a suggestion for how to handle operations that would overflow u64. If an overflow occurs, algorithms will returns an error.

To avoid having a lot of .checked_add(value).ok_or_else(||SelectionError::AbnormalHighValure)? repeated over the code, which can be a bit hard to read, a simple function sum reside in src/utils.rs

Another way would be to check at select_coin if the values given in inputs and options are abnormal. But then the overflows would still occur if the different algorithms are used directly.

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.

1 participant