diff --git a/src/node/shell/distributed_db_functors.ml b/src/node/shell/distributed_db_functors.ml index 093432d4f..f1d6f7b89 100644 --- a/src/node/shell/distributed_db_functors.ml +++ b/src/node/shell/distributed_db_functors.ml @@ -134,8 +134,8 @@ end = struct let commit s k = match Memory_table.find s.memory k with - | exception Not_found -> Lwt.return_unit (* TODO error ?? *) - | Pending _ -> Lwt.return_unit (* TODO error ?? *) + | exception Not_found -> Lwt.return_unit + | Pending _ -> assert false | Found v -> Disk_table.store s.disk v >>= fun _ -> Memory_table.remove s.memory k ; diff --git a/src/node/shell/validator.ml b/src/node/shell/validator.ml index 14f4659a8..7bbb0f50b 100644 --- a/src/node/shell/validator.ml +++ b/src/node/shell/validator.ml @@ -294,6 +294,9 @@ module Context_db = struct State.Valid_block.store net_state hash data >>=? function | None -> State.Valid_block.read net_state hash >>=? fun block -> + Lwt_list.iter_p (fun hash -> + Distributed_db.Operation.commit net_db hash) + block.operations >>= fun () -> return (Ok block, false) | Some block -> return (Ok block, true)