Fix bip158 example formatting

This commit is contained in:
Roman Zeyde 2021-02-17 22:35:13 +02:00
parent 052aaf1d80
commit 60e51ada36
1 changed files with 19 additions and 18 deletions

View File

@ -23,13 +23,14 @@
//! The filter construction proposed is an alternative to Bloom filters, as used in BIP 37,
//! that minimizes filter size by using Golomb-Rice coding for compression.
//!
//! USE :
//! // create a block filter for a block (server side)
//! ## Example
//!
//! ```ignore
//! fn get_script_for_coin(coin: &OutPoint) -> Result<Script, BlockFilterError> {
//! // get utxo ...
//! }
//!
//! // create a block filter for a block (server side)
//! let filter = BlockFilter::new_script_filter(&block, get_script_for_coin)?;
//!
//! // or create a filter from known raw data
@ -41,7 +42,7 @@
//! if filter.match_any(&block_hash, &mut query.map(|s| s.as_bytes())) {
//! // get this block
//! }
//!
//! ```
//!
use std::{cmp, fmt, io};