Skip to content

Commit

Permalink
Merge branch 'release/v0.46.x-celestia' into rp/btcsuite-v2.3.4
Browse files Browse the repository at this point in the history
  • Loading branch information
rootulp authored Sep 30, 2024
2 parents 563a617 + 3562f46 commit e655c07
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions types/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,13 @@ func (config *Config) assertNotSealed() {
}
}

func (config *Config) IsSealed() bool {
config.mtx.Lock()
defer config.mtx.Unlock()

return config.sealed
}

// SetBech32PrefixForAccount builds the Config with Bech32 addressPrefix and publKeyPrefix for accounts
// and returns the config instance
func (config *Config) SetBech32PrefixForAccount(addressPrefix, pubKeyPrefix string) {
Expand Down
7 changes: 7 additions & 0 deletions types/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,10 @@ func (s *configTestSuite) TestConfig_SetFullFundraiserPath() {
func (s *configTestSuite) TestKeyringServiceName() {
s.Require().Equal(sdk.DefaultKeyringServiceName, sdk.KeyringServiceName())
}

func (s *configTestSuite) TestIsConfigSealed() {
config := sdk.NewConfig()
s.Require().False(config.IsSealed())
config.Seal()
s.Require().True(config.IsSealed())
}

0 comments on commit e655c07

Please sign in to comment.