blockstream-electrs/examples/listener.rs
2018-08-15 17:05:12 +03:00

16 lines
285 B
Rust

extern crate electrs;
#[macro_use]
extern crate log;
use electrs::config::Config;
use electrs::notify;
fn main() {
let _ = Config::from_args();
let rx = notify::run().into_receiver();
for blockhash in rx.iter() {
info!("{:?}", blockhash.be_hex_string())
}
}