From f59b0aa44f4aebbae64e8dd96dc6e8b5aa17e947 Mon Sep 17 00:00:00 2001 From: Vincent Botbol Date: Sat, 30 Jun 2018 04:37:08 +0200 Subject: [PATCH] Alpha/Baker: only retain applied, delayed and unprocessed mempool operations --- src/proto_alpha/lib_delegate/client_baking_forge.ml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/proto_alpha/lib_delegate/client_baking_forge.ml b/src/proto_alpha/lib_delegate/client_baking_forge.ml index cfe6e264a..e88052ee7 100644 --- a/src/proto_alpha/lib_delegate/client_baking_forge.ml +++ b/src/proto_alpha/lib_delegate/client_baking_forge.ml @@ -264,11 +264,10 @@ let forge (op : Operation.packed) : Operation.raw = } let ops_of_mempool (ops : Alpha_block_services.Mempool.t) = + (* We only retain the applied, unprocessed and delayed operations *) List.rev ( Operation_hash.Map.fold (fun _ op acc -> op :: acc) ops.unprocessed @@ Operation_hash.Map.fold (fun _ (op, _) acc -> op :: acc) ops.branch_delayed @@ - Operation_hash.Map.fold (fun _ (op, _) acc -> op :: acc) ops.branch_refused @@ - Operation_hash.Map.fold (fun _ (op, _) acc -> op :: acc) ops.refused @@ List.rev_map (fun (_, op) -> op) ops.applied )