File tree 1 file changed +18
-2
lines changed
1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -64,8 +64,24 @@ func TestDoHash(t *testing.T) {
64
64
}
65
65
}
66
66
67
- func TestForgeNonexistenceProofWithIncorrectMaxPrefixLength (t * testing.T ) {
68
- spec := TendermintSpec
67
+ func TestForgeNonExistenceProofWithIncorrectMaxPrefixLength (t * testing.T ) {
68
+ spec := & ProofSpec { // TendermintSpec
69
+ LeafSpec : & LeafOp {
70
+ Prefix : []byte {0 },
71
+ PrehashKey : HashOp_NO_HASH ,
72
+ Hash : HashOp_SHA256 ,
73
+ PrehashValue : HashOp_SHA256 ,
74
+ Length : LengthOp_VAR_PROTO ,
75
+ },
76
+ InnerSpec : & InnerSpec {
77
+ ChildOrder : []int32 {0 , 1 },
78
+ MinPrefixLength : 1 ,
79
+ MaxPrefixLength : 1 ,
80
+ ChildSize : 32 , // (no length byte)
81
+ Hash : HashOp_SHA256 ,
82
+ },
83
+ }
84
+
69
85
spec .InnerSpec .MaxPrefixLength = 33
70
86
leafOp := spec .LeafSpec
71
87
aLeaf , _ := leafOp .Apply ([]byte ("a" ), []byte ("a" ))
You can’t perform that action at this time.
0 commit comments