Skip to content

Commit

Permalink
Remove a TODO in location_of_account_batch
Browse files Browse the repository at this point in the history
Justification: we don't have a choice in this function because unlike
loading an account by location here we can't tell of an account whether
it's a new one or just wasn't loaded from parent.

It might have an implication to performance of transaction processing (I
do see some db lookups despite the fact that we preload a lot of stuff).
But I think we'll handle it via special-casing unsafe_preload
function, not right here.
  • Loading branch information
georgeee committed Nov 28, 2023
1 parent 8c66c3e commit df631b4
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/lib/merkle_mask/masking_merkle_tree.ml
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,6 @@ module Make (Inputs : Inputs_intf.S) = struct
Base.location_of_account (get_parent t) account_id

let location_of_account_batch t =
(* TODO consider handling special case of empty addresses *)
self_find_or_batch_lookup
(fun id -> (id, Option.map ~f:Option.some @@ self_find_location t id))
Base.location_of_account_batch t
Expand Down

0 comments on commit df631b4

Please sign in to comment.