Documentation ¶
Index ¶
- func DeriveRand(r *rand.Rand) *rand.Rand
- func RandIntBetween(r *rand.Rand, min, max int) int
- func RandPositiveInt(r *rand.Rand, max sdk.Int) (sdk.Int, error)
- func RandStringOfLength(r *rand.Rand, n int) string
- func RandSubsetCoins(r *rand.Rand, coins sdk.Coins) sdk.Coins
- func RandTimestamp(r *rand.Rand) time.Time
- func RandomAmount(r *rand.Rand, max sdk.Int) sdk.Int
- func RandomDecAmount(r *rand.Rand, max sdk.Dec) sdk.Dec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeriveRand ¶
DeriveRand derives a new Rand deterministically from another random source. Unlike rand.New(rand.NewSource(seed)), the result is "more random" depending on the source and state of r.
NOTE: not crypto safe.
func RandIntBetween ¶
RandIntBetween returns a random int between two numbers inclusively.
func RandPositiveInt ¶
RandPositiveInt get a rand positive sdk.Int
func RandStringOfLength ¶
RandStringOfLength generates a random string of a particular length
func RandSubsetCoins ¶
returns random subset of the provided coins will return at least one coin unless coins argument is empty or malformed i.e. 0 amt in coins
func RandTimestamp ¶
RandTimestamp generates a random timestamp
func RandomAmount ¶
RandomAmount generates a random amount Note: The range of RandomAmount includes max, and is, in fact, biased to return max as well as 0.
Types ¶
This section is empty.