diff --git a/Discreet/DB/ChainDB.cs b/Discreet/DB/ChainDB.cs index f76534a..94faf3a 100644 --- a/Discreet/DB/ChainDB.cs +++ b/Discreet/DB/ChainDB.cs @@ -7,6 +7,7 @@ using System.IO; using System.Linq; using System.Text; +using System.Threading; using System.Threading.Tasks; using static NetMQ.NetMQSelector; @@ -371,7 +372,7 @@ public void DropEverything(string path) { foreach (var fi in chain.GetFiles()) { - fi.Delete(); + if (!fi.Name.StartsWith("LOCK")) fi.Delete(); } foreach (var di in chain.GetDirectories()) @@ -379,6 +380,11 @@ public void DropEverything(string path) di.Delete(true); } } + + indexer_output = new U32(0); + indexer_tx = new U64(0); + height = new L64(-1); + rdb?.Dispose(); } public Dictionary GetBlockCache()