From 39361b4e3a7d8e86e14095c1b765c097e8f59fe8 Mon Sep 17 00:00:00 2001 From: Sydhds Date: Thu, 19 Dec 2024 15:28:40 +0100 Subject: [PATCH] Improve massa db reset doc (for dev) (#4796) --- massa-db-worker/src/massa_db.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/massa-db-worker/src/massa_db.rs b/massa-db-worker/src/massa_db.rs index b1464f6c83..6a4e2e018f 100644 --- a/massa-db-worker/src/massa_db.rs +++ b/massa-db-worker/src/massa_db.rs @@ -720,8 +720,14 @@ impl MassaDBController for RawMassaDB { } /// Reset the database, and attach it to the given slot. + /// + /// This function is used in the FinalStateController::reset method which is used in the Bootstrap + /// process when the bootstrap fails (Bootstrap slot too old). A bootstrap to another node will likely occur + /// after this reset. fn reset(&mut self, slot: Slot) { - self.set_initial_change_id(slot); + // For dev: please take care of correctly reset the db to avoid any issue when the bootstrap + // process is restarted + self.set_initial_change_id(slot); // Note: this also reset the field: current_batch self.change_history.clear(); self.change_history_versioning.clear(); }