Skip to content

Commit

Permalink
doc: add comments for all public members
Browse files Browse the repository at this point in the history
  • Loading branch information
rustaceanrob committed Jun 10, 2024
1 parent e1e53cb commit df5aaa8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 17 deletions.
7 changes: 6 additions & 1 deletion src/chain/checkpoints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,19 @@ use std::{collections::VecDeque, str::FromStr};

use bitcoin::{BlockHash, Network};

/// Known Testnet3 block hashes.
pub const TESTNET_HEADER_CP: &[(u32, &str)] = &[(
546,
"000000002a936ca763904c3c35fce2f3556c559c0214345d31b1bcebf76acb70",
)];

/// Known block hashes for Regtest. Only the genesis hash.
pub const REGTEST_HEADER_CP: &[(u32, &str)] = &[(
0,
"0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206",
)];

/// Known block hashes for Signet.
pub const SIGNET_HEADER_CP: &[(u32, &str)] = &[
(
0,
Expand Down Expand Up @@ -95,10 +98,12 @@ pub const SIGNET_HEADER_CP: &[(u32, &str)] = &[
),
];

/// A known block hash in the chain of most work.
#[derive(Debug, Clone, Copy)]

pub struct HeaderCheckpoint {
/// The index of the block hash.
pub height: u32,
/// The Bitcoin block hash expected at this height
pub hash: BlockHash,
}

Expand Down
16 changes: 0 additions & 16 deletions src/filters/filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,4 @@ impl Filter {
)
.map_err(|_| FilterError::IORead)
}

// pub async fn filter_hash_from_block(block: &Block) -> FilterHash {
// let mut txmap = HashMap::new();
// for tx in block.txdata.iter().skip(1) {
// for input in tx.input.iter() {
// txmap.insert(input.previous_output, );
// }
// }
// let block_filter = BlockFilter::new_script_filter(block, |o| {
// if let Some(s) = txmap.get(o) {
// Ok(s.clone())
// }
// });
// let hash = sha256d::Hash::hash(&self.contents);
// FilterHash::from_raw_hash(hash)
// }
}

0 comments on commit df5aaa8

Please sign in to comment.