Skip to content

Commit

Permalink
Merge branch 'feature/merkle-mask-empty-account-preloading' into feat…
Browse files Browse the repository at this point in the history
…ure/merkle-mask-dont-rehash
  • Loading branch information
mrmr1993 committed Nov 21, 2023
2 parents e2d303d + 5eb3514 commit cd8f02c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/lib/staged_ledger/staged_ledger.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1018,8 +1018,15 @@ module T = struct
in
let new_mask = Ledger.Mask.create ~depth:(Ledger.depth t.ledger) () in
let new_ledger = Ledger.register_mask t.ledger new_mask in
Ledger.unsafe_preload_accounts_from_parent new_ledger [] ;
let transactions, works, commands_count, coinbases = pre_diff_info in
let accounts_accessed =
List.fold_left ~init:Account_id.Set.empty transactions ~f:(fun set txn ->
Account_id.Set.(
union set
(of_list (Transaction.accounts_referenced txn.With_status.data))) )
|> Set.to_list
in
Ledger.unsafe_preload_accounts_from_parent new_ledger accounts_accessed ;
[%log internal] "Update_coinbase_stack"
~metadata:
[ ("transactions", `Int (List.length transactions))
Expand Down

0 comments on commit cd8f02c

Please sign in to comment.