Skip to content

Commit

Permalink
fix: start fp after register (#246) [backport] (#248)
Browse files Browse the repository at this point in the history
Starts the fp instance fp register
  • Loading branch information
Lazar955 authored Dec 23, 2024
1 parent 785dd57 commit 16acd54
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)

* [#244](https://github.com/babylonlabs-io/finality-provider/pull/244) fix: save key name mapping
verifies if there is a eots client running
* [#246](https://github.com/babylonlabs-io/finality-provider/pull/246) fix: start fp after register

## v0.14.1

Expand Down
8 changes: 8 additions & 0 deletions finality-provider/service/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,14 @@ func (app *FinalityProviderApp) CreateFinalityProvider(
return nil, err
}

if err = app.startFinalityProviderInstance(storedFp.GetBIP340BTCPK(), ""); err != nil {
app.logger.Error(
"failed to start fp instance",
zap.String("eots_pk", pkHex),
zap.Error(err),
)
}

return &CreateFinalityProviderResult{
FpInfo: storedFp.ToFinalityProviderInfo(),
TxHash: successResponse.txHash,
Expand Down
2 changes: 0 additions & 2 deletions itest/test_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,6 @@ func (tm *TestManager) AddFinalityProvider(t *testing.T) *service.FinalityProvid
desc := newDescription(testMoniker)
_, err = fpApp.CreateFinalityProvider(cfg.BabylonConfig.Key, testChainID, passphrase, eotsPk, desc, &commission)
require.NoError(t, err)
err = fpApp.StartFinalityProvider(eotsPk, passphrase)
require.NoError(t, err)

cfg.RPCListener = fmt.Sprintf("127.0.0.1:%d", testutil.AllocateUniquePort(t))
cfg.Metrics.Port = testutil.AllocateUniquePort(t)
Expand Down

0 comments on commit 16acd54

Please sign in to comment.