Skip to content

Conversation

@natobritto
Copy link
Contributor

The conf_target argument only takes in values from 1 to 1008 inclusive. All values outside these ranges return an error. This commit adds validation for it in all versions from v17 to v30 with tests.

Partially fixes issue #474.

The conf_target argument only takes in values from 1 to 1008 inclusive
all values outside these ranges are not valid calls. This commit adds
validation for it in all versions from v17 to v30 with tests.
pub fn estimate_raw_fee(&self, conf_target: u32) -> Result<EstimateRawFee> {
if !(1..=1008).contains(&conf_target) {
return Err($crate::client_sync::error::Error::Returned(
"Invalid conf_target, must be between 1 and 1008".to_string(),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
"Invalid conf_target, must be between 1 and 1008".to_string(),
"invalid conf_target, must be between 1 and 1008 inclusive".to_string(),

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants