mirror of
https://github.com/bitcoin-s/bitcoin-s.git
synced 2024-11-19 01:40:55 +01:00
Fix bug where we were generating too many nonces (#4805)
This commit is contained in:
parent
8d91abd678
commit
ecf2d2ba2c
@ -280,7 +280,7 @@ object ECPrivateKey extends Factory[ECPrivateKey] {
|
||||
|
||||
/** Generates [[num]] private keys that are ordered by [[ECPrivateKey.schnorrNonce]] */
|
||||
def generateNonceOrderedPrivKeys(num: Int): Vector[ECPrivateKey] = {
|
||||
val privKeys = 0.to(num).map(_ => ECPrivateKey.freshPrivateKey).toVector
|
||||
val privKeys = 0.until(num).map(_ => ECPrivateKey.freshPrivateKey).toVector
|
||||
val sortByNonce = privKeys
|
||||
.map(p => (p, p.schnorrNonce))
|
||||
.sortBy(_._2)(CryptoOrdering.nonceOrdering)
|
||||
|
Loading…
Reference in New Issue
Block a user