rpc: support personal apis with different keyring backends (#591)
* UPDATE Unlock keyring on start * ADD comment * ADD validation Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
This commit is contained in:
parent
78c8ceb244
commit
e79a6ed6b2
@ -12,6 +12,7 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/cosmos/cosmos-sdk/codec"
|
"github.com/cosmos/cosmos-sdk/codec"
|
||||||
|
"github.com/cosmos/cosmos-sdk/crypto/keyring"
|
||||||
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
@ -101,6 +102,17 @@ which accepts a path for the resulting pprof file.
|
|||||||
return startStandAlone(serverCtx, appCreator)
|
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")
|
serverCtx.Logger.Info("starting ABCI with Tendermint")
|
||||||
|
|
||||||
// amino is needed here for backwards compatibility of REST routes
|
// amino is needed here for backwards compatibility of REST routes
|
||||||
|
Loading…
Reference in New Issue
Block a user