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

chore: query fp before register #226

Merged
merged 8 commits into from
Dec 17, 2024
Merged

chore: query fp before register #226

merged 8 commits into from
Dec 17, 2024

Conversation

Lazar955
Copy link
Member

@Lazar955 Lazar955 requested a review from gitferry December 16, 2024 13:40
@Lazar955 Lazar955 linked an issue Dec 16, 2024 that may be closed by this pull request
Copy link
Member

@gitferry gitferry left a comment

Choose a reason for hiding this comment

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

Great work!

return nil, fmt.Errorf("err getting finality provider: %w", err)
}
}
if resp != nil {
Copy link
Member

Choose a reason for hiding this comment

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

let's have a log here to indicate the registration is already done

Comment on lines 594 to 595
return fmt.Errorf("failed to query voting power for finality provider %v: %w",
btcPk, err)
Copy link
Member

Choose a reason for hiding this comment

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

let's print the hex string of the public key

Copy link
Member

Choose a reason for hiding this comment

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

Can we have a test case where the fp is already registered but not in db, so calling CreateFinalityProvider will save the fp in db?

Copy link
Member Author

Choose a reason for hiding this comment

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

Done!

@Lazar955 Lazar955 merged commit e995884 into main Dec 17, 2024
12 checks passed
@Lazar955 Lazar955 deleted the lazar/fp-reg-update branch December 17, 2024 13:17
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.

Query consumer chain to check if the fp is already registered
2 participants