mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-06-12 16:03:31 -07:00
parser: fix defrag
This commit is contained in:
@@ -16,6 +16,9 @@ out
|
||||
/datasets
|
||||
/datasets2
|
||||
/price
|
||||
*..*
|
||||
/txout_*
|
||||
/db
|
||||
|
||||
# Sync
|
||||
.stfolder
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+3
-2
@@ -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