mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-04-28 00:29:58 -07:00
parser: fix defrag
This commit is contained in:
@@ -69,7 +69,7 @@ where
|
||||
btree::iter(&self.txn, &self.db, None).unwrap()
|
||||
}
|
||||
|
||||
fn iter_collect(&self) -> BTreeMap<Key, Value>
|
||||
pub fn iter_collect(&self) -> BTreeMap<Key, Value>
|
||||
where
|
||||
Value: Clone,
|
||||
{
|
||||
@@ -244,14 +244,10 @@ where
|
||||
|
||||
let mut s = Self::open(&folder, &file).unwrap();
|
||||
|
||||
if !s.is_empty() {
|
||||
dbg!(s.len());
|
||||
panic!("Database isn't empty");
|
||||
if s.is_empty() {
|
||||
s.cached_puts = btree;
|
||||
s.export().unwrap();
|
||||
}
|
||||
|
||||
s.db_multi_put(btree).unwrap();
|
||||
|
||||
s.export().unwrap();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,10 +9,11 @@ mod utils;
|
||||
|
||||
pub use crate::{
|
||||
actions::iter_blocks,
|
||||
databases::{AnyDatabase, Database},
|
||||
io::{Binary, Json, Serialization, COMPRESSED_BIN_EXTENSION, JSON_EXTENSION},
|
||||
structs::{
|
||||
Config, Date, DateMap, Exit, Height, HeightMap, MapChunkId, MapValue, SerializedBTreeMap,
|
||||
SerializedVec, HEIGHT_MAP_CHUNK_SIZE, OHLC,
|
||||
Amount, Config, Date, DateMap, Exit, Height, HeightMap, MapChunkId, MapValue,
|
||||
SerializedBTreeMap, SerializedVec, TxoutIndex, HEIGHT_MAP_CHUNK_SIZE, OHLC,
|
||||
},
|
||||
utils::{create_rpc, log, reset_logs},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user