Skip to content

Commit

Permalink
misc: comments
Browse files Browse the repository at this point in the history
  • Loading branch information
namn-grg committed Jul 17, 2024
1 parent c9016ae commit deef806
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions bolt-spammer-helder/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ struct Opts {
private_key: String,
#[clap(short = 'a', long, env, default_value = "./registry_abi.json")]
registry_abi_path: PathBuf,
// Flag for blob mode
// Flag for generating a blob tx instead of a regular tx
#[clap(short, long, default_value = "false")]
blob: bool,
}
Expand All @@ -54,6 +54,8 @@ async fn main() -> Result<()> {

let beacon_api_client = BeaconApiClient::new(opts.beacon_client_url);

let registry = BoltRegistry::new(Url::from_str(&opts.el_provider_url)?, opts.registry_address);

let current_slot = current_slot(&beacon_api_client).await?;

tracing::info!(
Expand All @@ -71,14 +73,11 @@ async fn main() -> Result<()> {
.filter(|duty| duty.slot > current_slot)
.collect::<Vec<_>>();

let registry_url = Url::from_str(&opts.el_provider_url)?;
let registry = BoltRegistry::new(registry_url, opts.registry_address);

let (proposer_rpc, next_preconfer_slot) =
match registry.next_preconfer_from_registry(proposer_duties).await {
Ok(Some(res)) => res,
Ok(None) => {
// Handle the case where there is no next preconfer slot
tracing::info!("no next preconfer slot found");
return Ok(());
}
Err(e) => {
Expand All @@ -98,7 +97,7 @@ async fn main() -> Result<()> {
B256::from(keccak256(data))
};

let signature = wallet.sign_message(&message_digest).await?;
let signature = wallet.sign_message().await?;

let request = prepare_rpc_request(
"bolt_inclusionPreconfirmation",
Expand Down

0 comments on commit deef806

Please sign in to comment.