crypto: remove unused code (#8412)

This commit is contained in:
Sam Kleinman
2022-04-25 12:35:59 -04:00
committed by GitHub
parent 02c1c8ecb4
commit e36052c80e
13 changed files with 36 additions and 188 deletions

View File

@@ -1,6 +1,7 @@
package types
import (
"crypto/sha256"
"errors"
"fmt"
"time"
@@ -8,7 +9,6 @@ import (
"github.com/tendermint/tendermint/crypto/ed25519"
"github.com/tendermint/tendermint/crypto/secp256k1"
"github.com/tendermint/tendermint/crypto/sr25519"
"github.com/tendermint/tendermint/crypto/tmhash"
tmstrings "github.com/tendermint/tendermint/libs/strings"
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
)
@@ -328,8 +328,6 @@ func (params ConsensusParams) ValidateConsensusParams() error {
// This allows the ConsensusParams to evolve more without breaking the block
// protocol. No need for a Merkle tree here, just a small struct to hash.
func (params ConsensusParams) HashConsensusParams() []byte {
hasher := tmhash.New()
hp := tmproto.HashedParams{
BlockMaxBytes: params.Block.MaxBytes,
BlockMaxGas: params.Block.MaxGas,
@@ -340,11 +338,9 @@ func (params ConsensusParams) HashConsensusParams() []byte {
panic(err)
}
_, err = hasher.Write(bz)
if err != nil {
panic(err)
}
return hasher.Sum(nil)
sum := sha256.Sum256(bz)
return sum[:]
}
func (params *ConsensusParams) Equals(params2 *ConsensusParams) bool {