From d2bf4729cfc43c58bc3bb7eea25d8cf0b42d60d3 Mon Sep 17 00:00:00 2001 From: Lazar <12626340+Lazar955@users.noreply.github.com> Date: Mon, 23 Dec 2024 16:01:29 +0100 Subject: [PATCH] fix: start fp after register (#246) Starts the fp instance fp register --- CHANGELOG.md | 1 + finality-provider/service/app.go | 8 ++++++++ itest/test_manager.go | 2 -- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6da76533..c259bba9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/finality-provider/service/app.go b/finality-provider/service/app.go index c05734e9..80e4fc11 100644 --- a/finality-provider/service/app.go +++ b/finality-provider/service/app.go @@ -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, diff --git a/itest/test_manager.go b/itest/test_manager.go index 99d98317..2f99408c 100644 --- a/itest/test_manager.go +++ b/itest/test_manager.go @@ -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)