mirror of
https://github.com/tendermint/tendermint.git
synced 2026-10-01 04:05:45 +00:00
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:
@@ -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
|
||||
|
||||
@@ -24,10 +24,10 @@ const (
|
||||
// everything. This also affects the generalized proof system as
|
||||
// well.
|
||||
type Proof struct {
|
||||
Total int64 `json:"total"` // Total number of items.
|
||||
Index int64 `json:"index"` // Index of item to prove.
|
||||
LeafHash []byte `json:"leaf_hash"` // Hash of item value.
|
||||
Aunts [][]byte `json:"aunts"` // Hashes from leaf's sibling to a root's child.
|
||||
Total int64 `json:"total,string"` // Total number of items.
|
||||
Index int64 `json:"index,string"` // Index of item to prove.
|
||||
LeafHash []byte `json:"leaf_hash"` // Hash of item value.
|
||||
Aunts [][]byte `json:"aunts"` // Hashes from leaf's sibling to a root's child.
|
||||
}
|
||||
|
||||
// ProofsFromByteSlices computes inclusion proof for given items.
|
||||
|
||||
Reference in New Issue
Block a user