Proto: cleanup nonces once the seed is computed
This commit is contained in:
parent
0d8292048e
commit
1384253447
@ -31,8 +31,10 @@ let compute_for_cycle c cycle =
|
|||||||
let combine (c, random_seed) level =
|
let combine (c, random_seed) level =
|
||||||
Storage.Seed.Nonce.get c level >>=? function
|
Storage.Seed.Nonce.get c level >>=? function
|
||||||
| Revealed nonce ->
|
| Revealed nonce ->
|
||||||
|
Storage.Seed.Nonce.delete c level >>=? fun c ->
|
||||||
return (c, Seed_repr.nonce random_seed nonce)
|
return (c, Seed_repr.nonce random_seed nonce)
|
||||||
| Unrevealed _ ->
|
| Unrevealed _ ->
|
||||||
|
Storage.Seed.Nonce.delete c level >>=? fun c ->
|
||||||
return (c, random_seed)
|
return (c, random_seed)
|
||||||
in
|
in
|
||||||
Storage.Seed.For_cycle.get c previous_cycle >>=? fun seed ->
|
Storage.Seed.For_cycle.get c previous_cycle >>=? fun seed ->
|
||||||
|
Loading…
Reference in New Issue
Block a user