mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-04-24 06:39:58 -07:00
rpc: init wrapper crate + global: snapshot
This commit is contained in:
15
crates/brk_iterator/Cargo.toml
Normal file
15
crates/brk_iterator/Cargo.toml
Normal file
@@ -0,0 +1,15 @@
|
||||
[package]
|
||||
name = "brk_iterator"
|
||||
description = "A Bitcoin block iterator"
|
||||
version.workspace = true
|
||||
edition.workspace = true
|
||||
license.workspace = true
|
||||
homepage.workspace = true
|
||||
repository.workspace = true
|
||||
rust-version.workspace = true
|
||||
build = "build.rs"
|
||||
|
||||
[dependencies]
|
||||
bitcoin = { workspace = true }
|
||||
brk_reader = { workspace = true }
|
||||
brk_rpc = { workspace = true }
|
||||
1
crates/brk_iterator/README.md
Normal file
1
crates/brk_iterator/README.md
Normal file
@@ -0,0 +1 @@
|
||||
# brk_iterator
|
||||
8
crates/brk_iterator/build.rs
Normal file
8
crates/brk_iterator/build.rs
Normal file
@@ -0,0 +1,8 @@
|
||||
fn main() {
|
||||
let profile = std::env::var("PROFILE").unwrap_or_default();
|
||||
|
||||
if profile == "release" {
|
||||
println!("cargo:rustc-flag=-C");
|
||||
println!("cargo:rustc-flag=target-cpu=native");
|
||||
}
|
||||
}
|
||||
1
crates/brk_iterator/examples/iterator.rs
Normal file
1
crates/brk_iterator/examples/iterator.rs
Normal file
@@ -0,0 +1 @@
|
||||
fn main() {}
|
||||
13
crates/brk_iterator/src/lib.rs
Normal file
13
crates/brk_iterator/src/lib.rs
Normal file
@@ -0,0 +1,13 @@
|
||||
use brk_rpc::Client;
|
||||
|
||||
pub struct BlockIterator {
|
||||
client: Client,
|
||||
}
|
||||
|
||||
impl BlockIterator {
|
||||
pub fn new(client: Client) -> Self {
|
||||
Self { client }
|
||||
}
|
||||
|
||||
pub fn iter() {}
|
||||
}
|
||||
Reference in New Issue
Block a user