Alpha/Baker: only retain applied, delayed and unprocessed mempool operations
This commit is contained in:
parent
fbefa3940d
commit
f59b0aa44f
@ -264,11 +264,10 @@ let forge (op : Operation.packed) : Operation.raw =
|
|||||||
}
|
}
|
||||||
|
|
||||||
let ops_of_mempool (ops : Alpha_block_services.Mempool.t) =
|
let ops_of_mempool (ops : Alpha_block_services.Mempool.t) =
|
||||||
|
(* We only retain the applied, unprocessed and delayed operations *)
|
||||||
List.rev (
|
List.rev (
|
||||||
Operation_hash.Map.fold (fun _ op acc -> op :: acc) ops.unprocessed @@
|
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_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
|
List.rev_map (fun (_, op) -> op) ops.applied
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user