Delete the custom libs/json (tmjson) package. (#7673)

There are no further uses of this package anywhere in Tendermint.
All the uses in the Cosmos SDK are for types that now work correctly with the
standard encoding/json package.
This commit is contained in:
M. J. Fromberger
2022-01-24 08:15:34 -08:00
committed by GitHub
parent f6ebd84ee2
commit 7878ca6a8a
20 changed files with 104 additions and 1216 deletions
+4 -4
View File
@@ -7,14 +7,14 @@ import (
"github.com/tendermint/tendermint/crypto/ed25519"
"github.com/tendermint/tendermint/crypto/secp256k1"
"github.com/tendermint/tendermint/crypto/sr25519"
"github.com/tendermint/tendermint/libs/json"
"github.com/tendermint/tendermint/internal/jsontypes"
cryptoproto "github.com/tendermint/tendermint/proto/tendermint/crypto"
)
func init() {
json.RegisterType((*cryptoproto.PublicKey)(nil), "tendermint.crypto.PublicKey")
json.RegisterType((*cryptoproto.PublicKey_Ed25519)(nil), "tendermint.crypto.PublicKey_Ed25519")
json.RegisterType((*cryptoproto.PublicKey_Secp256K1)(nil), "tendermint.crypto.PublicKey_Secp256K1")
jsontypes.MustRegister((*cryptoproto.PublicKey)(nil))
jsontypes.MustRegister((*cryptoproto.PublicKey_Ed25519)(nil))
jsontypes.MustRegister((*cryptoproto.PublicKey_Secp256K1)(nil))
}
// PubKeyToProto takes crypto.PubKey and transforms it to a protobuf Pubkey