mirror of
https://github.com/logos-blockchain/logos-blockchain-pocs.git
synced 2026-01-05 22:53:10 +00:00
remove non-working code
This commit is contained in:
parent
c8e5dd9df9
commit
8229128fb0
@ -34,14 +34,6 @@ struct Args {
|
|||||||
async fn main() -> Result<(), Box<dyn error::Error>> {
|
async fn main() -> Result<(), Box<dyn error::Error>> {
|
||||||
let args = Args::parse();
|
let args = Args::parse();
|
||||||
|
|
||||||
let url = std::env::var("NOMOS_EXECUTOR").unwrap_or(TESTNET_EXECUTOR.to_string());
|
|
||||||
let user = std::env::var("NOMOS_USER").unwrap_or_default();
|
|
||||||
let password = std::env::var("NOMOS_PASSWORD").unwrap_or_default();
|
|
||||||
let basic_auth = Credentials {
|
|
||||||
username: user,
|
|
||||||
password: Some(password),
|
|
||||||
};
|
|
||||||
|
|
||||||
let filter =
|
let filter =
|
||||||
EnvFilter::try_from_default_env().unwrap_or_else(|_| EnvFilter::new(&args.log_level));
|
EnvFilter::try_from_default_env().unwrap_or_else(|_| EnvFilter::new(&args.log_level));
|
||||||
|
|
||||||
@ -54,23 +46,4 @@ async fn main() -> Result<(), Box<dyn error::Error>> {
|
|||||||
&args.prover_url,
|
&args.prover_url,
|
||||||
&args.zeth_binary_dir.unwrap_or_else(|| std::env::current_dir().unwrap()).join("zeth-ethereum"),
|
&args.zeth_binary_dir.unwrap_or_else(|| std::env::current_dir().unwrap()).join("zeth-ethereum"),
|
||||||
).await?;
|
).await?;
|
||||||
|
|
||||||
let consensus = NomosClient::new(Url::parse(&url).unwrap(), basic_auth);
|
|
||||||
|
|
||||||
let mut current_tip = HeaderId::default();
|
|
||||||
loop {
|
|
||||||
let info = consensus.get_cryptarchia_info().await?;
|
|
||||||
info!("Cryptarchia Info: {:?}", info);
|
|
||||||
|
|
||||||
if info.tip != current_tip {
|
|
||||||
current_tip = info.tip;
|
|
||||||
info!("New tip: {:?}", current_tip);
|
|
||||||
let block = consensus.get_block(info.tip).await?;
|
|
||||||
info!("Block: {:?}", block);
|
|
||||||
}
|
|
||||||
|
|
||||||
tokio::time::sleep(tokio::time::Duration::from_millis(500)).await;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user