[client.keyset] included maxDepth() in random depth generation
This commit is contained in:
parent
499e24fbba
commit
dc566d0942
|
@ -30,7 +30,7 @@ func (s *T) generate() {
|
||||||
var randMin, randMax = s.ctx.MinDepth() + (s.ctx.MaxDepth()-s.ctx.MinDepth()) / 2, s.ctx.MaxDepth()
|
var randMin, randMax = s.ctx.MinDepth() + (s.ctx.MaxDepth()-s.ctx.MinDepth()) / 2, s.ctx.MaxDepth()
|
||||||
|
|
||||||
/* (2) Select "random" depth */
|
/* (2) Select "random" depth */
|
||||||
s.depth = randMin + uint16(rand.Intn(int(randMax-randMin)))
|
s.depth = randMin + uint16(rand.Intn(int(randMax+1-randMin)))
|
||||||
|
|
||||||
/* (3) Reset comsumption level */
|
/* (3) Reset comsumption level */
|
||||||
s.mcode = 0
|
s.mcode = 0
|
||||||
|
|
Loading…
Reference in New Issue