Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

Commit

Permalink
rpc: support personal apis with different keyring backends (#591)
Browse files Browse the repository at this point in the history
* UPDATE Unlock keyring on start

* ADD comment

* ADD validation

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
  • Loading branch information
davcrypto and fedekunze authored Oct 6, 2021
1 parent 78c8ceb commit e79a6ed
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions server/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"time"

"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/crypto/keyring"

"github.com/spf13/cobra"

Expand Down Expand Up @@ -101,6 +102,17 @@ which accepts a path for the resulting pprof file.
return startStandAlone(serverCtx, appCreator)
}

serverCtx.Logger.Info("Unlocking keyring")

// fire unlock precess for keyring
keyringBackend, _ := cmd.Flags().GetString(flags.FlagKeyringBackend)
if keyringBackend == keyring.BackendFile {
_, err = clientCtx.Keyring.List()
if err != nil {
return err
}
}

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

// amino is needed here for backwards compatibility of REST routes
Expand Down

0 comments on commit e79a6ed

Please sign in to comment.