mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-06-12 07:53:32 -07:00
parser: fix metadata bug
This commit is contained in:
@@ -99,7 +99,7 @@ impl MetadataData {
|
||||
fn _import(path: &Path, version: u16) -> color_eyre::Result<Self> {
|
||||
fs::create_dir_all(path)?;
|
||||
|
||||
let s: MetadataData = Serialization::Binary.import(path)?;
|
||||
let s: MetadataData = Serialization::Binary.import(&Self::full_path(path))?;
|
||||
|
||||
if s.version != version {
|
||||
return Err(eyre!("Bad version"));
|
||||
|
||||
@@ -126,9 +126,10 @@ impl TxidToTxData {
|
||||
|
||||
impl AnyDatabaseGroup for TxidToTxData {
|
||||
fn import() -> Self {
|
||||
Self {
|
||||
metadata: Metadata::import(Self::root(), 2),
|
||||
let metadata = Metadata::import(Self::root(), 2);
|
||||
|
||||
Self {
|
||||
metadata,
|
||||
map: BTreeMap::default(),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user