rpc: replace Amino with new JSON encoder (#4968)

Migrates the `rpc` package to use new JSON encoder in #4955. Branched off of that PR.

Tests pass, but I haven't done any manual testing beyond that. This should be handled as part of broader 0.34 testing.
This commit is contained in:
Erik Grinaker
2020-06-08 14:04:05 +02:00
committed by GitHub
parent ccc990498d
commit ba3a2dde37
31 changed files with 105 additions and 204 deletions

View File

@@ -10,6 +10,7 @@ import (
"github.com/tendermint/tendermint/crypto"
"github.com/tendermint/tendermint/crypto/tmhash"
tmjson "github.com/tendermint/tendermint/libs/json"
)
//-------------------------------------
@@ -31,6 +32,11 @@ const (
SeedSize = 32
)
func init() {
tmjson.RegisterType(PubKey{}, PubKeyAminoName)
tmjson.RegisterType(PrivKey{}, PrivKeyAminoName)
}
// PrivKey implements crypto.PrivKey.
type PrivKey []byte