mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: improve beacon api example (#9660)
This commit is contained in:
@ -28,7 +28,7 @@ pub mod mined_sidecar;
|
||||
|
||||
fn main() {
|
||||
Cli::<BeaconSidecarConfig>::parse()
|
||||
.run(|builder, args| async move {
|
||||
.run(|builder, beacon_config| async move {
|
||||
// launch the node
|
||||
let NodeHandle { node, node_exit_future } =
|
||||
builder.node(EthereumNode::default()).launch().await?;
|
||||
@ -38,10 +38,11 @@ fn main() {
|
||||
|
||||
let pool = node.pool.clone();
|
||||
|
||||
node.task_executor.spawn(async move {
|
||||
let mut sidecar_stream = MinedSidecarStream {
|
||||
events: notifications,
|
||||
pool,
|
||||
beacon_config: args,
|
||||
beacon_config,
|
||||
client: reqwest::Client::new(),
|
||||
pending_requests: FuturesUnordered::new(),
|
||||
queued_actions: VecDeque::new(),
|
||||
@ -59,6 +60,8 @@ fn main() {
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
node_exit_future.await
|
||||
})
|
||||
.unwrap();
|
||||
|
||||
Reference in New Issue
Block a user