Skip to content

Commit

Permalink
fixed benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
Yashk767 committed May 19, 2022
1 parent 0ca9864 commit a6f3832
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/dispute_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -982,7 +982,7 @@ func BenchmarkHandleDispute(b *testing.B) {

utils.UtilsInterface = utilsPkgMock

medians := []uint32{6901548, 498307}
medians := []*big.Int{big.NewInt(6901548), big.NewInt(498307)}
revealedCollectionIds := []uint16{1}
revealedDataMaps := &types.RevealedDataMaps{
SortedRevealedValues: nil,
Expand Down
4 changes: 2 additions & 2 deletions cmd/propose_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -960,7 +960,7 @@ func TestMakeBlock(t *testing.T) {
args: args{
revealedDataMaps: &types.RevealedDataMaps{
SortedRevealedValues: map[uint16][]*big.Int{0: {big.NewInt(1), big.NewInt(1)}, 1: {big.NewInt(100), big.NewInt(100)}, 2: {big.NewInt(200), big.NewInt(200)}},
VoteWeights: map[string]*big.Int{big.NewInt(1).String(): big.NewInt(1000), big.NewInt(1).String(): big.NewInt(1000), big.NewInt(100).String(): big.NewInt(2000), big.NewInt(100).String(): big.NewInt(2000), big.NewInt(200).String(): big.NewInt(3000), big.NewInt(200).String(): big.NewInt(3000)},
VoteWeights: map[string]*big.Int{big.NewInt(1).String(): big.NewInt(1000), big.NewInt(100).String(): big.NewInt(2000), big.NewInt(200).String(): big.NewInt(3000)},
InfluenceSum: map[uint16]*big.Int{0: big.NewInt(500), 1: big.NewInt(10000), 2: big.NewInt(10000), 3: big.NewInt(10000)},
},
activeCollections: []uint16{0, 1, 2},
Expand Down Expand Up @@ -1321,7 +1321,7 @@ func BenchmarkMakeBlock(b *testing.B) {

cmdUtilsMock.On("GetSortedRevealedValues", mock.Anything, mock.Anything, mock.Anything).Return(&types.RevealedDataMaps{
SortedRevealedValues: map[uint16][]*big.Int{0: votes},
VoteWeights: map[string]*big.Int{big.NewInt(100).String(): big.NewInt(100)},
VoteWeights: map[string]*big.Int{(big.NewInt(1).Mul(big.NewInt(697718000), big.NewInt(1e18))).String(): big.NewInt(100)},
InfluenceSum: map[uint16]*big.Int{0: big.NewInt(100)},
}, nil)
utilsMock.On("GetActiveCollections", mock.Anything).Return([]uint16{1}, nil)
Expand Down

0 comments on commit a6f3832

Please sign in to comment.