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

feat(bridge): get dr timestamp agnostic to protocol version upgrades #2534

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

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.

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