Skip to content

Commit

Permalink
Problem: app don't have access to current keyring-backend config (bac…
Browse files Browse the repository at this point in the history
…kport #483) (#484)

Update CHANGELOG.md



fix lint

add keyring flag

Update server/start.go

Signed-off-by: yihuang <huang@crypto.com>
  • Loading branch information
yihuang authored May 2, 2024
1 parent 1588ad2 commit 814fcac
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ Ref: https://keepachangelog.com/en/1.0.0/
* (rpc) [#473](https://github.com/crypto-org-chain/ethermint/pull/473) Avoid panic on invalid elasticity_multiplier.
* (rpc) [#480](https://github.com/crypto-org-chain/ethermint/pull/480) Fix parsed logs from old events.

### Improvements

* (app) [#483](https://github.com/crypto-org-chain/ethermint/pull/483) Make keyring-backend client config accessible in app.

## v0.21.x-cronos

### Bug Fixes
Expand Down
7 changes: 5 additions & 2 deletions server/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ which accepts a path for the resulting pprof file.
serverCtx.Logger.Info("Unlocking keyring")

// fire unlock precess for keyring
keyringBackend, _ := cmd.Flags().GetString(flags.FlagKeyringBackend)
if keyringBackend == keyring.BackendFile {
krBackend := clientCtx.Keyring.Backend()
if krBackend == keyring.BackendFile {
_, err = clientCtx.Keyring.List()
if err != nil {
return err
Expand All @@ -157,6 +157,9 @@ which accepts a path for the resulting pprof file.

serverCtx.Logger.Info("starting ABCI with Tendermint")

// set keyring backend type to the server context
serverCtx.Viper.Set(flags.FlagKeyringBackend, krBackend)

// amino is needed here for backwards compatibility of REST routes
err = wrapCPUProfile(serverCtx, func() error {
return startInProcess(serverCtx, clientCtx, opts)
Expand Down

0 comments on commit 814fcac

Please sign in to comment.