Skip to content

Commit

Permalink
tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
ulbqb committed Feb 7, 2023
1 parent 2b68605 commit dfc7bad
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions types/block_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,12 @@ func TestBlockValidateBasic(t *testing.T) {
{"Tampered LastBlockID", func(blk *Block) {
blk.LastBlockID = BlockID{Hash: []byte("something else")}
}, true},
{"Negative Round", func(blk *Block) {
blk.Round = -1
}, true},
{"Incorrect Proof Size", func(blk *Block) {
blk.Proof = []byte("wrong proof size")
}, true},
}
for i, tc := range testCases {
tc := tc
Expand Down Expand Up @@ -846,6 +852,7 @@ func TestBlockProtoBuf(t *testing.T) {
require.EqualValues(t, tc.b1.Data, block.Data, tc.msg)
require.EqualValues(t, tc.b1.Evidence.Evidence, block.Evidence.Evidence, tc.msg)
require.EqualValues(t, *tc.b1.LastCommit, *block.LastCommit, tc.msg)
require.EqualValues(t, tc.b1.Entropy, block.Entropy, tc.msg)
} else {
require.Error(t, err, tc.msg)
}
Expand Down

0 comments on commit dfc7bad

Please sign in to comment.