mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-05-22 15:54:47 -07:00
global: cleanup
This commit is contained in:
@@ -1,21 +1,20 @@
|
||||
use std::path::Path;
|
||||
|
||||
use brk_core::{Dollars, Height, Result, Sats, Version};
|
||||
use brk_store::{AnyStore, Store};
|
||||
use brk_core::Result;
|
||||
|
||||
fn main() -> Result<()> {
|
||||
let p = Path::new("./examples/_fjall");
|
||||
|
||||
let keyspace = brk_store::open_keyspace(p)?;
|
||||
|
||||
let mut store: Store<Dollars, Sats> =
|
||||
brk_store::Store::import(&keyspace, p, "n", Version::ZERO, None)?;
|
||||
// let mut store: Store<usize, usize> =
|
||||
// brk_store::Store::import(&keyspace, p, "n", Version::ZERO, None)?;
|
||||
|
||||
store.insert_if_needed(Dollars::from(10.0), Sats::FIFTY_BTC, Height::ZERO);
|
||||
// store.insert_if_needed(Sats::new(10), Sats::FIFTY_BTC, Height::ZERO);
|
||||
|
||||
store.commit(Height::ZERO)?;
|
||||
// store.commit(Height::ZERO)?;
|
||||
|
||||
store.persist()?;
|
||||
// store.persist()?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user