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 <[email protected]>
  • Loading branch information
davcrypto and fedekunze committed Oct 7, 2021
1 parent 11bd115 commit ccb5b45
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 ccb5b45

Please sign in to comment.