Add GenIdentity, an identity function for MappedShuffle.
We use this function in z_sendmany as part of the fix for #1779.
This commit is contained in:
@@ -25,6 +25,11 @@ uint64_t GetRand(uint64_t nMax);
|
||||
int GetRandInt(int nMax);
|
||||
uint256 GetRandHash();
|
||||
|
||||
/**
|
||||
* Identity function for MappedShuffle, so that elements retain their original order.
|
||||
*/
|
||||
int GenIdentity(int n);
|
||||
|
||||
/**
|
||||
* Rearranges the elements in the range [first,first+len) randomly, assuming
|
||||
* that gen is a uniform random number generator. Follows the same algorithm as
|
||||
|
||||
Reference in New Issue
Block a user