Skip to content

Commit

Permalink
chore: removed check if err is votingpower table, if there is no vp t…
Browse files Browse the repository at this point in the history
…able, do not start the FP
  • Loading branch information
RafilxTenfen committed Sep 13, 2024
1 parent f67078c commit a2df2b1
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions finality-provider/service/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,11 +255,9 @@ func (app *FinalityProviderApp) SyncFinalityProviderStatus() error {
for _, fp := range fps {
vp, err := app.cc.QueryFinalityProviderVotingPower(fp.BtcPk, latestBlock.Height)
if err != nil {
if !strings.Contains(err.Error(), bstypes.ErrVotingPowerTableNotUpdated.Wrapf("height: %d", latestBlock.Height).Error()) {
// if error occured then the finality-provider is not registered in the Babylon chain yet
continue
}
// if nothing was updated in the voting power table, it should consider as zero VP to start to send pub random
// if error occured then the finality-provider is not registered in the Babylon chain yet or
// there is nothing in the voting power table, so it should not start the fp.
continue
}

if !fp.ShouldSyncStatusFromVotingPower(vp) {
Expand Down

0 comments on commit a2df2b1

Please sign in to comment.