types: validate Part#Proof

add ValidateBasic to crypto/merkle/SimpleProof
This commit is contained in:
Anton Kaliaev
2019-10-29 11:00:56 -07:00
committed by Jack Zampolin
parent 470a23f9b4
commit c207fa6eff
5 changed files with 82 additions and 2 deletions
+2
View File
@@ -19,6 +19,7 @@ import (
abci "github.com/tendermint/tendermint/abci/types"
cfg "github.com/tendermint/tendermint/config"
cstypes "github.com/tendermint/tendermint/consensus/types"
"github.com/tendermint/tendermint/crypto/tmhash"
cmn "github.com/tendermint/tendermint/libs/common"
"github.com/tendermint/tendermint/libs/log"
mempl "github.com/tendermint/tendermint/mempool"
@@ -732,6 +733,7 @@ func TestProposalPOLMessageValidateBasic(t *testing.T) {
func TestBlockPartMessageValidateBasic(t *testing.T) {
testPart := new(types.Part)
testPart.Proof.LeafHash = tmhash.Sum([]byte("leaf"))
testCases := []struct {
testName string
messageHeight int64