mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-29 03:05:49 +00:00
remove some assertXxx funcs
This commit is contained in:
@@ -42,13 +42,9 @@ func New(dir string) FileStore {
|
||||
return FileStore{dir}
|
||||
}
|
||||
|
||||
// assert FileStore satisfies keys.Storage
|
||||
var _ keys.Storage = FileStore{}
|
||||
|
||||
// assertStorage just makes sure we implement the proper Storage interface
|
||||
func (s FileStore) assertStorage() keys.Storage {
|
||||
return s
|
||||
}
|
||||
|
||||
// Put creates two files, one with the public info as json, the other
|
||||
// with the (encoded) private key as gpg ascii-armor style
|
||||
func (s FileStore) Put(name string, key []byte, info keys.Info) error {
|
||||
|
||||
@@ -22,13 +22,9 @@ func New() MemStore {
|
||||
return MemStore{}
|
||||
}
|
||||
|
||||
// assert MemStore satisfies keys.Storage
|
||||
var _ keys.Storage = MemStore{}
|
||||
|
||||
// assertStorage just makes sure we implement the Storage interface
|
||||
func (s MemStore) assertStorage() keys.Storage {
|
||||
return s
|
||||
}
|
||||
|
||||
// Put adds the given key, returns an error if it another key
|
||||
// is already stored under this name
|
||||
func (s MemStore) Put(name string, key []byte, info keys.Info) error {
|
||||
|
||||
Reference in New Issue
Block a user