Skip to content

Commit

Permalink
makes the expected values dependant on the existing constants
Browse files Browse the repository at this point in the history
  • Loading branch information
staheri14 committed Aug 2, 2024
1 parent 6333e56 commit dd88c8a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion consensus/reactor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -833,7 +833,8 @@ func TestNewValidBlockMessageValidateBasic(t *testing.T) {
},
{
func(msg *NewValidBlockMessage) { msg.BlockParts = bits.NewBitArray(int(types.MaxBlockPartsCount) + 1) },
"blockParts bit array size 1602 not equal to BlockPartSetHeader.Total 1",
fmt.Sprintf("blockParts bit array size %d not equal to"+
" BlockPartSetHeader.Total 1", types.MaxBlockPartsCount+1),
},
}

Expand Down
2 changes: 1 addition & 1 deletion types/params_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func TestConsensusParamsValidation(t *testing.T) {
2: {makeParams(47*1024*1024, 0, 10, 2, 0, valEd25519), true},
3: {makeParams(10, 0, 10, 2, 0, valEd25519), true},
4: {makeParams(100*1024*1024, 0, 10, 2, 0, valEd25519), true},
5: {makeParams(101*1024*1024, 0, 10, 2, 0, valEd25519), false},
5: {makeParams(MaxBlockSizeBytes+(1*1024*1024), 0, 10, 2, 0, valEd25519), false},
6: {makeParams(1024*1024*1024, 0, 10, 2, 0, valEd25519), false},
7: {makeParams(1024*1024*1024, 0, 10, -1, 0, valEd25519), false},
8: {makeParams(1, 0, -10, 2, 0, valEd25519), false},
Expand Down

0 comments on commit dd88c8a

Please sign in to comment.