1
0
Fork 0
mirror of https://github.com/romanz/electrs.git synced 2025-02-23 14:50:45 +01:00
electrs/examples/listener.rs
2018-08-15 17:40:56 +03:00

15 lines
289 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!("block {}", blockhash.be_hex_string())
}
}