Skip to content

Conversation

@guidiaz
Copy link
Contributor

@guidiaz guidiaz commented Nov 19, 2024

No description provided.

@guidiaz guidiaz force-pushed the bridge/protocol-agnostic-get-dr-timestamp branch from 3d9a37e to 7d4fb36 Compare December 12, 2024 09:53
@guidiaz guidiaz requested a review from aesedepece January 16, 2025 11:13
Comment on lines +86 to +88
Err(_) => {
return None;
}
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Err(_) => {
return None;
}
Err(_) => None;

Ok(x) => x,
Err(()) => {
log::error!("Failed to get current protocol info from witnet client, will retry later");
return Some(witnet_consensus_constants);
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
return Some(witnet_consensus_constants);
Some(witnet_consensus_constants)

Ok(result) => result,
Err(_) => {
log::error!("Failed to connect to witnet client, will retry later");
return Err(());
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
return Err(());
Err(())

.expect("failed to deserialize consensus constants"),
Err(e) => {
log::error!("error in getConsensusConstants call: {:?}", e);
return Err(());
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
return Err(());
Err(())

log::error!("error in getConsensusConstants call: {:?}", e);
return Err(());
log::error!("Error when getting protocol info: {:?}", e);
Err(())
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Err(())
Err(())

Copy link
Contributor Author

@guidiaz guidiaz Jan 20, 2025

Choose a reason for hiding this comment

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

All these "returns" are on purpose, as they're intended to exit the function, not the match block.

@aesedepece aesedepece force-pushed the master branch 2 times, most recently from 1679d32 to 1b59db0 Compare February 13, 2025 13:22
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.

2 participants