go-waku/waku/v2/protocol/requestId_test.go

16 lines
282 B
Go
Raw Normal View History

package protocol
import (
"testing"
"github.com/stretchr/testify/require"
)
func TestGenerateRequestId(t *testing.T) {
// Force 2 reseed to ensure this is working as expected
for i := 1; i < 20001; i++ {
bytes := GenerateRequestId()
require.Equal(t, 32, len(bytes))
}
}