From 13842534472e0d2bf690871f1657b7005a861211 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Henry?= Date: Fri, 22 Sep 2017 18:19:57 +0200 Subject: [PATCH] Proto: cleanup nonces once the seed is computed --- src/proto/alpha/seed_storage.ml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/proto/alpha/seed_storage.ml b/src/proto/alpha/seed_storage.ml index d159dfd8c..7214d31ca 100644 --- a/src/proto/alpha/seed_storage.ml +++ b/src/proto/alpha/seed_storage.ml @@ -31,8 +31,10 @@ let compute_for_cycle c cycle = let combine (c, random_seed) level = Storage.Seed.Nonce.get c level >>=? function | Revealed nonce -> + Storage.Seed.Nonce.delete c level >>=? fun c -> return (c, Seed_repr.nonce random_seed nonce) | Unrevealed _ -> + Storage.Seed.Nonce.delete c level >>=? fun c -> return (c, random_seed) in Storage.Seed.For_cycle.get c previous_cycle >>=? fun seed ->