1
0
Fork 0
mirror of https://github.com/romanz/electrs.git synced 2025-02-23 22:56:55 +01:00
electrs/examples/listener.rs

16 lines
289 B
Rust
Raw Normal View History

2018-08-15 10:32:13 +03:00
extern crate electrs;
#[macro_use]
extern crate log;
2018-08-15 10:32:13 +03:00
use electrs::config::Config;
use electrs::notify;
2018-08-15 10:32:13 +03:00
fn main() {
let _ = Config::from_args();
let rx = notify::run().into_receiver();
for blockhash in rx.iter() {
2018-08-15 17:09:53 +03:00
info!("block {}", blockhash.be_hex_string())
}
2018-08-15 10:32:13 +03:00
}