feat: add rand funcs to math (#15043)

This commit is contained in:
Marko
2023-02-18 18:39:46 +00:00
committed by GitHub
parent 497dc2cb78
commit 2b484a241f
24 changed files with 188 additions and 36 deletions
+2 -2
View File
@@ -10,12 +10,12 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
cmtrand "github.com/cometbft/cometbft/libs/rand"
"cosmossdk.io/math/unsafe"
)
func randCompactBitArray(bits int) (*CompactBitArray, []byte) {
numBytes := (bits + 7) / 8
src := cmtrand.Bytes((bits + 7) / 8)
src := unsafe.Bytes((bits + 7) / 8)
bA := NewCompactBitArray(bits)
for i := 0; i < numBytes-1; i++ {