Fix validator export failing when validator.db is in nested directory (#15351)

* files changed

* added changelog file

* added tests and formatting changes

* fixed bugs

* fixed formatting
This commit is contained in:
Rose Jethani
2025-05-30 20:23:19 +05:30
committed by GitHub
parent 711984d942
commit 3300866572
12 changed files with 162 additions and 115 deletions

View File

@@ -930,7 +930,7 @@ func TestProposerSettingsLoader(t *testing.T) {
set.Bool(flags.EnableBuilderFlag.Name, true, "")
}
cliCtx := cli.NewContext(&app, set, nil)
validatorDB := dbTest.SetupDB(t, [][fieldparams.BLSPubkeyLength]byte{}, isSlashingProtectionMinimal)
validatorDB := dbTest.SetupDB(t, t.TempDir(), [][fieldparams.BLSPubkeyLength]byte{}, isSlashingProtectionMinimal)
if tt.withdb != nil {
err := tt.withdb(validatorDB)
require.NoError(t, err)
@@ -978,7 +978,7 @@ func Test_ProposerSettingsLoaderWithOnlyBuilder_DoesNotSaveInDB(t *testing.T) {
set := flag.NewFlagSet("test", 0)
set.Bool(flags.EnableBuilderFlag.Name, true, "")
cliCtx := cli.NewContext(&app, set, nil)
validatorDB := dbTest.SetupDB(t, [][fieldparams.BLSPubkeyLength]byte{}, isSlashingProtectionMinimal)
validatorDB := dbTest.SetupDB(t, t.TempDir(), [][fieldparams.BLSPubkeyLength]byte{}, isSlashingProtectionMinimal)
loader, err := NewProposerSettingsLoader(
cliCtx,
validatorDB,